10-3
Disk Commands
DELete
NOTE You cannot execute the command CDIR "A:\" on 86100A/B instruments. Also, you cannot execute the command
CDIR "C:\" or CDIR “D:\” (86100C). If you attempt to execute CDIR "C:\" or CDIR “D:\” (86100C), the present
working directory (PWD) is not changed. The directory specified must be below “D:\User Files\”.
DELete
Command :DISK:DELete "<file_name>"
This command deletes a file from the disk. If no path is specified, it searches for the file using
the present working directory. <file_name> is a character-quoted ASCII string which can
include subdirectories with the name of the file. The following error is displayed on the ana-
lyzer screen if the requested file does not exist:
The file
“D:\User Files” cannot be deleted.
NOTE This command operates only on files and directories on “D:\User Files” (C: on 86100A/B) or on any external drive
or mapped network drive.
Example 10 OUTPUT 707;":DISK:CDIRECTORY SETUPS"
20 OUTPUT 707;":DISK:DELETE ""FILE1.SET"""
DIRectory?
Query :DISK:DIRectory? [ "<directory>" | {CGRade | ROOT | LSUMmaries | SETups | SIMages | SMASks | TDRCal |
UMASks | WAVeforms}]
This query returns the requested directory listing. The directory may be specified as a string,
such as "D:\User Files\waveforms", or as a parameter. (C drive on 86100A/B instruments.) If
no parameter is used, a listing of the present working directory is returned.
Each line in the returned list is terminated in a newline character only. A carriage return
character is not included with the newline character.
<directory> The list of file names and directories.
Returned Format [:DISK:DIRectory]<N><NL><directory><NL>
<N> The specifier that is returned before the directory listing, indicating the number of lines in
the listing.
<directory> The list of filenames and directories. Each line is separated by a <NL>.
Example This example displays a number, then displays a list of files and directories in the current
directory. The number indicates the number of lines in the listing.
10 DIM A$[80]
20 INTEGER Num_of_lines
30 OUTPUT 707;":DISK:DIR?"
40 ENTER 707;Num_of_lines
50 PRINT Num_of_lines
60 FOR I=1 TO Num_of_lines
70 ENTER 707;A$
80 PRINT A$
90 NEXT I
100 END