Your best friend for file transfer.

Fetch application logoFetch

applescript (3 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 21 years ago by mike-l
  • Latest reply 21 years ago from mike-l
  • mike-l Member

    i need an applescript for uploading multiple files to a remote directory. I tried recordig it but it did not work.
    what i need is kind of an applescript version of the ftp-command "mput *".
    mike

    Posted 21 years ago #

  • Jim Matthews Administrator

    Here's a script that should work. You have to change the first line to refer to the place where you want the files uploaded.

    property destURL : "ftp://myuserid:@myhost/mydirectory/"

    set srcFolder to choose folder with prompt "Pick a folder of files to upload"
    set srcFiles to list folder srcFolder

    set srcFolderPath to (srcFolder as string)

    tell application "Fetch 4.0.3"
    repeat with curSrcFile in srcFiles
    set fullPath to (srcFolderPath & curSrcFile)
    put into url destURL item alias fullPath
    end repeat
    end tell

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 21 years ago #

  • mike-l Member

    great. thank you very much for your quick help.

    Posted 21 years ago #

Topic closed

This topic has been closed.