Command groups
File system command group
Use the commands in the File System Command Group to help you use the
built-in hard disk drive. You can use the commands to do the following:
List the contents of the current directory
Create and delete directories
Create, copy, read, rename, or delete a file
When using these commands, keep the following points in mind:
File arguments are always enclosed within double quotes:
“C:\MYDIR\TEK00001.SET”
File names follow the MS-DOS format: [DRIVE:][\PATH\]filename
Path separators can be either forw ard slashes (/) or b ack slashe s (\)
NOTE. Using a back slash as a path separator can p roduce some unexpected
results, depending on how your controller application treats escaped characters.
Many applications recognize the sequence of a back slash followed by an
alphabetic character as an escaped character, and, as such, interpret that
alphabetic character as a control character. For example, the sequence “\n”
might be interpreted as a newline character; “\t” might be interpreted as a tab
character. To ensure that this interpretation does n ot occur, you can use double
back slashes. For example, “C:\\testfile.txt”.
Some FILESystem commands can fail because a file has read-only attributes.
You will not be able to delete or replace such files until this attribute is
removed. Refer to the operating system help on file properties for further
information.
Table 2-
28: File system commands
Command
Descrip
tion
FILESystem? Returns the file system state.
FILESystem:COPy Copies one or more files to a new file.
FILESystem:CWD Sets or queries the current working directory for FILESystem commands.
FILESystem:DELEte Deletes a named file or directory.
FILESystem:DIR? Returns a list of directory contents.
FILESystem:HOMEDir?
Retu
rns the current user's home directory.
FILESystem:LDIR? Returns a list of directory contents.
FILESystem:MKDir
Mak
es a new directory.
FILESystem:READFile Copies the named file to the interface.
FILESystem:REName Assigns a new name to an existing file.
MSO54, MSO56, MSO58, MSO58LP Programmer 2-33