ARCHIVEDIR Define Robo-FTP’s archive folder
<< Click to Display Table of Contents >> Navigation: Robo-FTP User's Guide > Script Programming > Script Commands > All Script Commands > ARCHIVEDIR Define Robo-FTP’s archive folder |
Syntax: |
ARCHIVEDIR |
[ path name ] |
Arguments: |
[ path name ] |
Optional variable or string to specify the path name of Robo-FTP’s archive folder. |
Options: |
none |
|
This script command defines the destination folder for archiving files after they are successfully uploaded using the SENDFILE command with the /archive option.
Consider the following example where a file named "example.txt" is moved to a folder named "c:\Program Files\Robo-FTP X.X\archive" if it is uploaded successfully:
;; archive "c:\Program Files\Robo-FTP X.X\example.txt" after sending
ARCHIVEDIR "c:\Program Files\Robo-FTP X.X\archive"
SENDFILE "example.txt" /archive
The archive folder remains defined for the duration of the current script execution so a script should only call the ARCHIVEDIR command multiple times if the process logic requires using different archive destination folders at different points during execution.
If the path name argument is not provided, no changes are made and the current archival directory is displayed:
ARCHIVEDIR "c:\Program Files (x86)\Robo-FTP 3.10\UserData\jimmy\work"
ARCHIVEDIR
*Archive folder: c:\Program Files (x86)\Robo-FTP 3.10\UserData\jimmy\work\
If the directory specified is not writable and its permission can be read the ARCHIVEDIR command will fail and set %lasterror to $ERROR_WRITE_PERMISSION_DENIED
If the path is not a directory or does not exist it will fail and set %lasterror to $ERROR_LOCAL_DIR_INVALID
Related command(s): SENDFILE, MAKEDIR, WORKINGDIR