MAKEFILENAME Create a unique, non-existent file name |
Top Previous Next |
This script command creates a unique name for a non-existent file and saves it in a specified script variable. This variable may be used in any Robo-FTP command that needs a uniquely named file. The file is not created until it is used in a command.
It is not required to specify [ ext ], [ dir ], or [ base ], however the arguments are position dependent, so [ base ] requires both [ ext ] and [ dir ] to be present, and [ dir ] requires [ ext ].
The file name returned by this command will not exist at the time the command is run, but there is no guarantee that a file of this name will not be created by some other program, so choose a naming combination that is unlikely to be used by any other program.
Consider the following example in which only the [ file name ] variable is present. The file name created would resemble c:\program files\robo-ftp\roboXXXX.tmp, where XXXX would be 0001, 0002, etc. depending on whether there is a previously existing file or not.
;; create a unique file name in current working folder MAKEFILENAME newfile
Below is an example where all four arguments are present.
;; create a file named "c:\temp\mailXXXX.eml" MAKEFILENAME newfile "eml" "c:\temp" "mail"
Related Command(s): WORKINGDIR |