Your best friend for file transfer.

Fetch application logoFetch

applescript/ downloading files (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 22 years ago by scarmody
  • Latest reply 22 years ago from scarmody
  • scarmody Member

    I'm trying to develop an applescript that can download a file. I'm currently this snippet of code:

    with timeout of 60000 seconds
    tell application "Fetch 4.0"
    download url gDesturl
    -- quit
    end tell
    end timeout

    where gDesturl contains a valid ftp url. Fetch connects successfully to the server, starts the download, and then pops up a Dialog box asking me where to store the file.

    I want this process to run automatically, and I'd like to be able to specify, in the applescript code, the local path where I'd like Fetch to store the file. I don't see any properties on the download verb that would allow me to specify this. Suggestions?

    Should I be using some other verb/command?

    thanks for any help.

    Posted 22 years ago #

  • Jim Matthews Administrator

    You could temporarily set the download folder, but I'd recommend using the copy verb:

    copy url gDestURL to beginning of alias "HD:folder:"

    My standard AppleScript advice is to try recording a script that does what you want (in this case you'd record dragging a file from Fetch to a folder icon in the Finder).

    Jim Matthews
    Fetch Softworks

    Posted 22 years ago #

  • scarmody Member

    Thanks! That did the trick.

    Posted 22 years ago #

Topic closed

This topic has been closed.