filezilla.exe -u “c:\ftp\TestFile.txt” ftp://ftp_user:ftp_password@ftp_host_ip/folderpath -close
Filezilla can be scripted. If you're using Windows, it's built-in FTP can also be scripted.
Just put together a script that moves the file to all the desired hosts and run it when you update the index file.
Scripting instructions
When you want to automate tasks with programs that accept command line arguments, scripting is how you do it.
You will need the following information:
- The full path to the file you wish to upload.
- The username, password, server IP address or domain name, and folder path to the files that need to be updated.
The "Remote Site" is for if you've set up a connection profile for each server in FileZilla. You can call the connection profile by name and thus avoid having to enter the username, password, server, and path for each connection. Looking at the documentation though, I think entering the information is easier and more clear.
In FileZilla, create a connection profile for each server you wish to upload the file to.
Open Notepad. Enter the following text changed for your specific settings and needs. Save the file as (whatever name you want).bat.
filezilla.exe -u "<full path to the file on your computer>" ftp://username:password@server/path -close
Add as many copies of this line as you need: one for each of the files you're updating.
Bob's answer shows how you can use loops and a source file to automate much of this process. It's a lot more difficult to understand the syntax of the loops, but his solution does the same thing and may be easier to manage if you have to update a large number of servers.
I have no background in scripting. How do I go about this? Should I create a script file(.vbs?) and paste the above code there? Also what is "Remote Site"? – John – 2012-02-15T13:06:18.037
Not VBS. You'll want to do this in Batch script, which is a .bat file. Batch scripting it merely stringing together command prompt commands and their arguments. VBS uses VB commands, which aren't the same. – music2myear – 2012-02-15T14:15:16.093
Currently I have
filezilla.exe -u "d:\file.txt" ftp://username:passowrd@www.mysite.com/public_html/domainfolder -close
in a .bat file. But how to execute? I tried pressing enter, just a flash of the command prompt appears. I ran command prompt and execute the file and it said that 'filezilla' is not a recognized command... – John – 2012-02-15T19:44:17.053Put the full path to the filezilla executable in there. Windows apparently doesn't know where to look for that. It should be something like "C:\Program Files\FileZilla\FileZilla.exe". Because there are spaces in the path, you'll need to enclose it in quotes so the command processor recognizes it is one argument. – music2myear – 2012-02-15T22:05:56.097
It runs in the command prompt, but it says "unknown option -u". Then it opens up a dialogue box about filezilla arguments which is the same here: http://wiki.filezilla-project.org/Command-line_arguments_(Client%5C). From there, I don't see any examples of uploading.
– John – 2012-02-16T06:24:24.300Do you have the most recent version of FileZilla? If it is not working like this, they may have removed that CLI capability. You should try Bob's answer below. – music2myear – 2012-02-16T14:19:17.043