4

I run a radio show, and we deliver audio to a bunch of stations via FTP upload. Currently I use Filezilla and have to connect to each stations' FTP server one by one in order to upload the audio every week.

Wondering if there is a script or program out there that would automatically upload these MP3 files to a list of different locations on different FTP servers each week for us.

The files use the same name each week so we are replacing the files on the servers.

Any tips appreciated! Cheers

0

2 Answers 2

3

It is not difficult to write a reusable script. If you are on Windows, you can use WinSCP, as already suggested by @RulonRock. There's even an article on WinSCP site that fit your needs:
Upload to multiple servers / Parametrized script.

Modifying it slightly to match your description – Create a WinSCP script file like this:

open %1%
put c:\local\source\path\*.mp3
exit

And run it from a batch file like:

winscp.com /script=script.txt /parameter ftp://user1:[email protected]/path1/
winscp.com /script=script.txt /parameter ftp://user2:[email protected]/path2/

(I'm the author of WinSCP)


Similarly for download:
How to download a file from multiple Linux machines using WinSCP or batch script?

2
  • I will give this a go tonight, thank you very much! Commented Jan 24, 2020 at 7:05
  • The man himself, nice to see your active on here. I am sure I butchered my WinSCP explanation. Thank you for creating the script as I wouldn't even know where to start.
    – Rulon Rock
    Commented Jan 24, 2020 at 7:07
2

If you are using Linux, a simple bash script should suffice. If you are using windows, you can create a ftp script (and a batch script so you can use it easily). Here is a great article regarding just that. The easiest way would be for you to create a script with all servers, and make it upload a file with a universal name. Of course if you need to upload files with a date code or special name, you would need to use the suggested software in the next paragraph.

If you need to connect to SFTP servers, then you need to use WinSCP as it is able to do so with more powerful scripting functionality. It has great documentation and allows for parameters, as well as enviroment variables which can let you use a custom name. Here is a link to the scripting docs. I personally have never used WinSCP, but have used the ftp command but I hear great things about the former.

1
  • This is perfect. Thank you very much! Commented Jan 24, 2020 at 7:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .