Put <local filename or filename pattern> [, <remote filename>]
Transfer the file <local filename> from the current directory on the lcoal computer to the current directory of the remote computer and store it under the name <remote filename> (or under <local filename> if <remote filename> is omitted).
The remote file name parameter is only valid, if the first parameter does not contain a pattern, otherwise please check the ForEach command.
Files are transferred between the current local and remote directories, so you probably will need LocalChDir and RemoteChDir commands before actually starting the transfer.
Additionally, if you use Put with a file pattern, the command supports the -o, -y and -d parameters to select files based on date/time as described with the GetSync command.
If the file already exists on the remote machine, the users access rights on the server will determine if it may be overwritten or not.
See also: Get, PutSync, PutDir (which offers additional transfer options), FtpMode, ForEach, file patterns
Examples:
Put "index.html"
Put "server01data.dbf", "data.dbf"
Put "today.log", "log$(year)$(month)$(day).log" (see Macros)
Put "*.html"
Put -d0 "*.htm" (only send htm files with a file date of today)
Put ["*; ~*.tmp]" (send all files except tmp files, see filename/foldername patterns)
← Back to Script Commands