Your best friend for file transfer.

Fetch application logoFetch

upload finish before download starts (7 posts)

  • Started 6 years ago by curtis matthews
  • Latest reply 3 years ago from Scott McGuire
  • curtis matthews Member

    Hi. I'm probably looking right past the asnwer on this.
    I want to use automator to automatically download files that hit a certain folder on my ftp site. However, before I want to download, I want to make sure that my clien't files have finished uploading. When done, I need a download and then want to make sure that's done before I work in the automatically delete.
    Please point out what I'm overlooking.
    -curtis

    Posted 6 years ago #

  • Scott McGuire Administrator

    Hi Curtis,

    Unfortunately, there is no direct way for an FTP client to ask a server if a file being uploaded by another person is done yet; that's simply not information an FTP server hands out.

    So you have to rely on indirect methods, such as checking the file size every minute or so to see if it's stopped changing, or make sure the modification date is several minutes old (which would probably mean the upload has finished).

    You cannot do either of those sort of checks using Fetch's Automator actions, however, it would be possible to do it using AppleScript. We could probably write an example AppleScript that would do this for you, if an AppleScript would be an acceptable solution.

    Let us know. Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 6 years ago #

  • curtis matthews Member

    Sure a script would work.

    Was hoping that automator would allow this to work because I am the only one in the office with applescript experience and that is pretty limited. Thought by keeping it in automator I could get others more involved in the process and they wouldn't be overwhelmed by a real script.

    Have 2 ftp sites. Each has about 3 direct paths to a specific folder for a specific magazine. So have 7 magazines, each with their own folder. Was looking for an automator script (only for ease of editing) to wait for a file to finish downloading (my guess was by monitoring no additional acitivity on the size change of a file); download the file to our server; take the name of file, name of folder, size (in MB), add the download date and time; put that text in an e-mail or a text edit file; attach it to a mail file and send to ad sales CSR and the production person monitoring that magazine; and finally delete the file from the site.

    Whew that took a while to say all at the same time, so maybe not such an easy task.

    Figured automator might make it easy to reroute the download folder, if needed, and to possibly alter the e-mail address of who should get the message for which monitored folder.

    Seemed like I could do all that in automator with your presets and some of the ones associated with the mail program and automator.

    Suggestions?

    Posted 6 years ago #

  • Jim Matthews Administrator

    Hi Curtis,

    We have an example script called "WatchServerFolder" that watches a folder and downloads files that are placed there; but it does not try to handle the case where the script notices the file while it is still being uploaded. I will try to improved the script and let you know when I have something to test.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 6 years ago #

  • Jim Matthews Administrator

    Hi Curtis,

    I have an improved "WatchServerFolder" script that is ready to test. Could you send a message to bugs at fetchsoftworks dot com? I'll send back the script for you to try.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 6 years ago #

  • Richard Moussa Member

    Is there any way I can get a copy of this script? I am having the same issue.

    Posted 3 years ago #

  • Scott McGuire Administrator

    Hi Richard,

    Please contact us at bugs@fetchsoftworks.com .

    Thanks,

    Scott McGuire
    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.