Your best friend for file transfer.

Fetch application logoFetch

Apple Script or Automator to Upload one file/folder to multiple FTP (14 posts)

  • Started 13 years ago by Donald
  • Latest reply 3 years ago from Jim Matthews
  • Donald Member

    Hi,

    I'm looking for an easy how-to/example of a script that can be used to upload a group of selected files/folders to multiple FTP. Right now I'm manually selecting FTPs and dragging and dropping files which is a very slow and error pron process. Is there a better/faster use to do this in fetch?

    Thanks,

    Donald

    Posted 13 years ago #

  • Scott McGuire Administrator

    Hi Donald,

    We have a help topic that describes how to use Automator to create a multi-server upload droplet; I think this is what you want. Please see creating an Upload Files to Multiple Servers Droplet and let us know if you have any questions.

    The above page assumes you're familiar with Automator; if you're not, you may want to read the introduction to using Automator with Fetch help topic first.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Edited 13 years ago #

  • Donald Member

    Thank you for the reply but I'm using Mac OS 10.4.11 which doesn't have automator variables. Is there a different tutorial that doesn't use variable.

    Thanks,

    Donald

    Posted 13 years ago #

  • Scott McGuire Administrator

    Hi Donald,

    It is not possible to create a multi-server upload workflow in Automator without using variables.

    We do have a multi-server upload AppleScript that you can give a try. It's part of the Fetch Example Scripts (click the link to download them).

    The example script you want to use is the one titled "Multi-Server DropUpload." To configure it you need to know the URLs of the sites you want to upload to - URLs are a single line of information that describe the hostname, username, and path of where you want the files to be uploaded.

    Instead of trying to manually enter the URLs for the servers you want to upload to are, it would be easier to let Fetch do the work for you - you can use the Copy Fetch Address command to get the URL.

    So here's what I would suggest:

    1. In Fetch, connect to the first server and folder you want to upload to.
    2. Choose Edit > Copy Fetch Address (or type Command-C).
    3. Run the Multi-Server DropUpload script. It will ask you to enter the destination URL.
    4. Choose Edit > Paste (or type Command-V). The URL will be pasted into the AppleScript's prompt.
    5. Click the Add button.
    6. Now the AppleScript will show you a list of the URLs it is configured with (which should be just the one so far).
    7. Switch back to Fetch, connect to the next server and folder, and choose Copy Fetch Address again.
    8. Switch back to the script, and click the Add button to bring up the entry form for adding another URL.
    9. Paste the second URL into the script, click Add.
    10. Repeat steps 7-9 for all the servers you want to upload to, and once you're done, click the Done button in the script. The script will quit.
    11. Now the script is ready to use; you will not have to do the steps above again unless you want to add more servers.

    To use the script:

    * In the Finder, drag and drop the files you want to upload to multiple servers on to the Multi-Server DropUpload script's icon.
    * The script will ask you to select the servers you want to upload to. Select them by clicking on them.
    * Click the Upload button.
    * The script will run Fetch and start uploading the files; at the end it will open a log showing you what it did.

    Please let us know if you have further questions.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 13 years ago #

  • Simon CodeRater Member

    Hi Donald. This AppleScript on CodeRater.net will be able to help you.

    http://www.coderater.net/FTP/AppleScript/2013/01/Simple-FTP-Upload-46.html

    Posted 11 years ago #

  • Jim Matthews Administrator

    Hi Simon,

    I appreciate your interest in promoting your site, but could you limit your posts here to current topics (this one is two years old), and to scripts that use Fetch (rather than shell scripting)?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 11 years ago #

  • Steve Walker Inactive

    Hi

    I have tried to use the above automator task but cannot get it it to work properly.

    I would like to deliver 1 folder of files to 3 different supplier's ftp sites.

    I enter all the details in to automator but when I run the script, it uploads 3 times to one of the ftps. When I re open the application that I have made in Automator, all log in details have changed to the same one. I have all of the sites set up as shortcuts and have tried entering them in to automator both using the shortcut icon and by typing manually.

    Is this a bug?

    Steve

    Posted 10 years ago #

  • Jim Matthews Administrator

    Hi Steve,

    I'm a bit confused. Are you using the "Multi-Server DropUpload" AppleScript that Scott McGuire talks about above?

    Jim Matthews
    Fetch Softworks

    Posted 10 years ago #

  • Steve Walker Inactive

    Hi Jim

    No sorry I was following "creating an Upload Files to Multiple Servers droplet" instructions as posted in the second thread down.

    Steve

    Posted 10 years ago #

  • Jim Matthews Administrator

    My apologies, I missed that reference!

    So you have three Upload Files actions, each one configured for a different FTP server, but when you save the workflow and open it again, they're all configured the same way?

    What version of Mac OS X do you have?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 10 years ago #

  • Steve Walker Inactive

    Hi Jim

    That's right.

    It is 10.7

    Steve

    Posted 10 years ago #

  • Jim Matthews Administrator

    Hi,

    I think I recall a problem with Automator on 10.7 not saving the Upload Files action correctly. I don't have a 10.7 machine handy for testing, so my recommendation would be to try the Multi-Server DropUpload AppleScript described by Scott above. Please let me know if you have any questions about it, or run into any problems.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 10 years ago #

  • Andrew Parker Member

    Have we got a script to work with the latest Mac Operating systems yet please?

    Posted 3 years ago #

  • Jim Matthews Administrator

    Hi Andrew,

    No, unfortunately I still don't have a version of Fetch with AppleScript support that works on macOS 10.15 or later. That's still something I hope to do, but it will take a fair amount of work and my time has been limited.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 3 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.