Command Line FTP

The command line FTP is used to achieve the FTP functionality over the command line. It is used to transfer files using FTP to and from a host with a UNIX file system, using pcsftpcmd.exe. It can be invoked from the command line using a set of parameters and switches. The functions supported by the executable are:
  • Download a file
  • Upload a file
  • Delete a file (host side)
  • Create a new directory (host side)
The necessary arguments for invoking the executable are:
hostname
This is the first argument and you need to specify the FTP server host name to which you want to connect.
username / password
These are the second and third arguments, which specify the user credentials to access the given host.
operation
In this argument you can specify the operation that needs to be performed. Possible operations are:
  • /d - This switch is used for downloading a file from the host to the client system. This switch should be followed by the local directory where the file needs to be downloaded, a space and the complete path of the host file along with the name of the file that needs to be downloaded.
  • /u - This switch is used for uploading a file from the client system to the host server. This switch should be followed by the complete path of the local directory along with the name of the file that needs to be uploaded, a space and the host directory where the file needs to be uploaded.
  • /FILE - This switch is used to specify that a set of FTP commands are contained in a separate file and needs to be executed. This switch is followed by the complete path and the name of the file that contains the batch commands.
  • MKDR - This switch is used to create a new Directory at the host. This is followed by the name of the directory to be created.
  • DELE - This switch is used to delete a file from the host. This switch is followed by the complete path along with the name of the file to be deleted.

The transfer mode is set to AUTOMATIC, that is, the executable automatically checks to see if the extension of the file to be transferred is one of .log, .ini, .txt, .bat, .inf, in which case the mode is set to ASCII. For everything else it is set to BINARY mode.

Use one of the following switches to invoke help:
  • -?
  • /?
  • -HELP

The issue here is that the password would be in plain text, which would be a security concern which can be overcome by requesting the customer to explicitly enter the password when the connection is being made.

The initial command line FTP being developed would entertain non-secure connections alone and would not support secure connections. The command line FTP currently under development would support only Windows/Unix style file systems. Other file systems would be supported in future releases.

If the user does not want to give the password in plain text along with the other parameters, a - can be entered in the password field, and then run the command which asks for the user to input the password dynamically.

The command line FTP is currently available only in English language.