what is a commandline FTP client?
That's an FTP client without a fancy GUI. They don't have been written for interactive use, but batch files and automatic/scheduled processes. If your OS is Windows, there is a very basic commandline client already included (FTP.exe).
A script is essentially like a batch file for DOS, mostly a line-by-line list of pseudo-DOS or FTP commands. I'd put it this way: Everything you'd have to enter manually into the commandline FTP to get a job done can also be simply written into a text file and processed automatically.
Example for the Windows FTP: You want to upload the contents of the directory C:\localdir into the directory /remotedir on the server ftp.example.com.
Line 1 - FTP by default asks confirmation for certain actions. As we execute in batch mode, we don't want that.
Line 2 - lcd command is used to set the local directory. This is essentially the same as selecting a directory on the local side in FileZilla.
Line 3 - Connects to a server. If a port is required, add it after the servername, separated by a blank.
Line 4 - Username, after opening a server FTP automatically requests this.
Line 5 - Password, see above. This completes the login.
Line 6 - This command changes the server directory.
Line 7 - Puts the server into Binary data type (see Data Type
). This example assumes all files need to be transferred Binary (JPG for example). Use ascii for ASCII type.
Line 8 - mULTIPLEput command uploads multiple files, the asterisk means ALL files in this dir, but you could also use *.jpg, for example.
Line 9 - Disconnects from the server, quits FTP.exe and returns control to your batch file.
That's it. Now you simply put the script in a file and execute FTP.exe -s:<script file name> .
Sounds complicated, but is actually fairly easy. With a little variation you can do the above example upload to multiple servers. Just delete line 3 (the open command) from the script and execute FTP.exe -s:<script file name> <server name> . With a batch file like this:
ftp.exe -sSCRIPT.FTP ftp.example.com
ftp.exe -sSCRIPT.FTP ftp.example2.com
ftp.exe -sSCRIPT.FTP ftp.example3.com
ftp.exe -sSCRIPT.FTP ftp.example4.com
ftp.exe -sSCRIPT.FTP ftp.example5.com
we have now uploaded the same files to 5 servers, and all we needed was starting the batch file.
## BEGIN SIGNATURE BLOCK ###
FTP connection problems? Do yourself a favor and read Network Configuration
.All FileZilla products fully support IPv6. http://worldipv6launch.orgAll support requests per PM will be ignored!
### END SIGNATURE BLOCK ###