SENDFILE        Send one or more files

Top  Previous  Next

Syntax:

SENDFILE

[ file name ]  [ /options ]

Arguments:

[ file name ]

Variable or string defining a file or path name; if no path is defined FileLink’s working folder is used; wildcard characters are permitted in the file name itself (not the path name portion) as long as the file name conforms to the 8.3 file naming convention; wildcard characters not supported when using ASCII, Xmodem, or Xmodem1K protocols

Options:

/archive

Move [ file name ] to the designated archive folder after a successful transmission

 

/delete

Delete [ file name ] after it has been successfully sent; local folders are not deleted

 

/flush

If the protocol used allows the sender to define the name of the file on the remote system, send the full path name (not just name of the file)

 

/fullpath

If the protocol used allows the sender to define the name of the file on the remote system, send the full path name (not just name of the file)

 

/iflarger

In Zmodem file transfers only, do not overwrite the host or remote file if it is smaller than, or the same size as, the file being sent from the local PC

 

/ifnewer

In Zmodem file transfers only, do not overwrite the host or remote file if the file date and time is newer than, or the same as, the file being sent from the local PC

 

/ifnotexist

In Zmodem file transfers only, do not overwrite a host or remote file of the same name if it already exists

 

/nostatus

Do not display send file status dialog box

 

/timeout=xx

Time-out in seconds to wait for a send file operation to start; if xx is 0, FileLink waits indefinitely

 

 

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