Your best friend for file transfer.Fetch
applescript/ downloading files (3 posts)
- Started 13 years ago by scarmody
- Latest reply 13 years ago from scarmody
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
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.
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).
Thanks! That did the trick.
- Page 1
This topic has been closed.