Skip to content

FTP Client Script File Format

A script file is an ASCII text file that contains a sequence of FTP (or SFTP) commands.

  • Each command must be on a separate line.

  • Space and tab characters can precede the command on a line.

  • Use a semicolon character (;) for comments. The FTP Client ignores comment text.

You can use comments to explain one or more lines of code. For example:

;The following lines connect to the server and change
;the working directories to PREPRESS (client) and
;PRESS (server).
open forum thomasp XOYRCNEL973L9L96O376ONMO770L35L7NMO87PM79
lcd c:\prepress
cd /press

You can also add a comment at the end of a command. For example:

set transfer-disposition unique  ;do not overwrite files
mput script is s*.doc  ;copy the .DOC files

note

Semicolons are not supported for comments in scripts supplied to the sftp command line using the -B option. Use the number sign (#) to mark comments in these batch files.

More information