DOS command line support

BlueZone Secure FTP uses command line switches so that the application can be executed and controlled from a DOS command line interface or a DOS batch file or a Windows program or script.

Refer to Command line switch table for a complete listing.

Basic examples

If you want to launch the application from a DOS batch file and include a configuration file named config.zft to start the session, use the /F command line switch:
"C:\Program Files\BlueZone\BZFTP.EXE" /Fconfig.zft 
If you want to launch the application from a DOS batch file and set the initial PC directory to a folder called C:\MyFiles, use the /I command line switch:
"C:\Program Files\BlueZone\BZFTP.EXE" /Ic:\MyFiles
You can also combine command line switches in one statement. The following example combines the two examples above:
"C:\Program Files\BlueZone\BZFTP.EXE" /Fconfig.zft /Ic:\MyFiles
Or, instead of including a configuration file in your DOS batch file, you can direct the batch file to use one of the existing FTP host connections that you have stored in your connection list. This list is zero based, so if you want to call the first connection in the list, use /Z0 as shown here:
"C:\Program Files\BlueZone\BZFTP.EXE" /Z0

Other examples

Initial commands (/L command line switch) are used to configure the application to perform specific FTP commands upon connect. For example, if you want to configure the application to perform an upload of a file named upload.txt and then a download of a file named download.txt during your batch execution, use the following command line switch:
BZFTP.EXE /L"STOR upload.txt" /L"RETR download.txt" /L"EXIT"

The /L"EXIT" command line switch closes the application once the initial commands complete.

Nested double quotes

There are sometimes issues with getting double quotes to appear inside other double quotes through a DOS batch file. In BlueZone Secure FTP, we have implemented a special syntax that translates into a double quote and a blank space. The ampersand (&) translates into a double quote (") and the percent sign (%) translates into a blank space ( ). The following is an example of using this syntax:
BZFTP.EXE /L"STOR &upload.txt& upload" /L"EXIT"

This translates the STOR command to STOR "upload.txt" upload, which uploads the local file upload.txt to the host as upload.

Double double quotes

Some scripting and programming languages support the use of double double quotes. The following example shows the use of double double quotes when you are calling BlueZone Secure FTP to run from a program or script using the /Z and /L commend line switches:
Run "C:\Program Files\BlueZone\BZFTP.EXE /Z0 /L""RETR F1201.CSV""