Command Line FTP

 

It is recommended that you first go into the site manager and create a site profile.   While it is not required that you use a site profile via command line, it is strongly recommended for security reasons (to protect your user and password).  For more examples without a site profile, check the help file topic 'command  line' from within Core FTP.

 

Once you have verified that your site profile connects and lists the remote directory correctly from within the GUI, you can then be assured that command line transfers will work with your site profile.

 

 

FTP Upload via command line:

 

Standard upload of a file with a site profile named 'mysite' into a remote directory /upload/:

 

c:”\program files\coreftp\coreftp.exe” -s -O -u c:\path\file.dat  -site mysite  -p /upload/

 

 

Zip and upload a directory from c:\IBM' to a remote directory /public_html/store:

 

"c:\program files\coreftp\coreftp.exe" -s -O -ZIP -AUTONAME -u c:\IBM -site mysite  -p /public_html/store/  -output c:\temp\output.log  -log d:\temp\log.log

 

 

The -output  and -log parameter are for information about transfers.  They are optional but listed for informational purposes.

 

 

FTP Download via command line:

 

Download all text files from a remote directory /downloads/

 

"c:\program files\coreftp\coreftp.exe" -s -O  -d  /downloads/*.txt  -site mysite  -p c:\windows\desktop\   

 

 

 

 

The -s is for silent mode.  In the Pro version the splash screen is completely removed.

 

 

To specify a different destination filename, use -FN filename.

 

 

See the help topic "command line" in the Core FTP help file for a detailed list of options and examples.

 

 

Overwrite/Resume options:

 

-O -- Overwrite if file exists

-OA -- Overwrite *all* if transfering a folder or directory of files.

-ON -- Overwrite files that are newer than existing files.

-OG -- Overwrite destination file if source file size is greater.

-OL -- Overwrite destination file if source file size is less (smaller).

-OS -- Skip file if exists

-R -- Resume if file exists

-RA -- Resume *all* files that exist.

 

 

In build 1437, a utility called corecmd.exe was added to allow blocking transfers. Use the same commmand line parameters your transfers will block until completed.

 

 

 

 



FTP Command line examples