DeleteFile |
Top Previous Next |
Syntax - DeleteFile {<FilePathAndName>|InputFile|LogFile|} Where <FilePathAndName> is a string literal or a variable containing a string.
Description: This command is used to delete the file specified in the literal string <FilePathAndName> or by the keywords InputFile and LogFile. <FilePathAndName> must be a valid path and file name that is accessible from the workstation on which EMUE is running. This path can be local, on a network, or on an FTP server.
Note: If the keywords LogFile or InputFile are used, the file will be closed (if necessary) before it is copied and will no longer be available to the script. After the file is moved any script command that references the file will result in an error. It is recommended that use of this command be reserved for use at the end of a script. Note: The key terms #TODAY#, #TIME#, #SCRIPTFILENAME#, #SCRIPTFOLDER# and #INPUTFILENAME# can also be used to identify the source file. These keywords should be used carefully. For example, #TIME# is replaced with the current time when this line of the script is run. It is unlikely to match a timestamp in the name of the file. #TODAY# would be useful for a file created with a time-stamp in the same day, but be sure that the date formats match otherwise the file names will not match.
Note: If a literal string that is used to define a path and file does not begin with a drive letter or two backslashes ("\\"), the path will be treated as relative to the directory that contains the script file.
Sample 1: The following code will delete the specified file from the C: drive. DeleteFile "c:\somefile.txt"
Sample 2: The following code will delete the specified file from the FTP server. DeleteFile "ftp://100.1.10.1/somefile.txt"
See Also:
|