SENDFILE Send one or more files |
Top Previous Next |
This script command sends one or more files to the remote system.
The protocols listed below automatically send the name of each file to the remote system in a preceding header block. This permits the receiver to automatically create a file with the same name as the original.
Kermit Ymodem Zmodem
When using one of these file transfer protocols, multiple files may be sent by using wildcard characters (*, ?) in the [ file name ]. Consider the following example in which all the files in a particular directory are sent to the remote system using the Zmodem protocol.
PROTOCOL "zmodem" SENDFILE "c:\My Data\*.*" /timeout=30
The Kermit file transfer protocol does not specify a way to wait for the transfer to complete. Instead, the receiving side simply receives however much data is sent in the window of time allotted for receiving files.
When a wildcard is used to transfer multiple files, the number of files sent is stored in the %sendfilecount variable.
The following protocols do not support the sending of more than one file in a single SENDFILE command nor the use of wildcards.
ASCII Xmodem Xmodem1K
Note Automatic transmission of multiple files may be accomplished with these protocols using the GETNEXTFILE command and a conditional looping structure within a script file.
The /archive option automatically moves a local file to an archive folder defined using the ARCHIVEDIR script command after it has been successfully sent. If a file by the same name exists in the archive folder, it is overwritten.
The /delete option automatically deletes a local file after it has been successfully sent.
The /iflarger, /ifnewer, and /ifnotexist options may be used to control if host or server files are to be overwritten when sent by FileLink. These options are supported by Zmodem transfers only. These options are mutually exclusive. When using the /ifnewer option, the determination of the newest file is based on a comparison of the time and date each file was last written to. The file write time comparison is based only on the hour and minute.
The /archive option automatically moves a local file to an archive folder defined using the ARCHIVEDIR script command after it has been successfully sent. If a file by the same name exists in the archive folder, it is overwritten.
Related Command(s): RCVFILE, LINEIN, LINEOUT, PROTOCOL, WORKINGDIR
|