ScriptFTP usually runs in a window but there is also a command line version of it. It works exactly the same way as the usual ScriptFTP except that it will not display any windows, it will just write the script messages to the command prompt. The program file is called scriptftp_console.exe and you can find it in the directory where you installed ScriptFTP. As this command prompt version does not display any windows or dialog boxes you must specify which script you want to run:

ScriptFTP_console.exe <script_file_path> [custom parameter] [custom parameter]…..[custom parameter]

As usual in the command line tools, the symbols < and > indicate a mandatory paramater whereas [ and ] are used for optional parameters.

For example:

ScriptFTP_console.exe C:\MyScripts\upload.ftp

If the script path contains spaces remember to use double quotes to enclose it:

ScriptFTP_console.exe “C:\My Scripts\upload some files.ftp”

The custom parameters are optional and can be used in order to pass information to your script, for example, the FTP login or the files to be uploaded. You can access these parameters from within your script file using the GETPARAM command. Note that ScriptFTP.exe (the GUI version of ScriptFTP) obeys the same syntax and also accepts command line parameters.

# This script is used for uploading the specified file
# to the FTP server. Use it this way:
# ScriptFTP.exe this_script.ftp the_file_to_upload
 
# Note:
# The GETPARAM command was added in ScriptFTP 2.1
# Build March 14th 2006.
 
$param3 = GETPARAM(3)
 
PRINT("Uploading file ".$param3)
 
OPENHOST("127.0.0.1","carl","123456")
 
PUTFILE($param3)
 
CLOSEHOST

If you want ScriptFTP.exe to close itself once the script has finished use the EXIT command in your script or the /AUTOCLOSE command line parameter:

ScriptFTP.exe closes_itself_once_finished.ftp /AUTOCLOSE

Further info here.