Create a gist now

Instantly share code, notes, and snippets.

download files with Fetch
-- my settings for testing
set theHost to ""
set loginName to "anonymous"
set remotePath to "/example/"
set localStorage to ((path to home folder) as text) & "LOCALSTORAGE:1234567890:"
-- Connect to FTP
tell application "Fetch"
set tWindow to make new transfer window at beginning with properties {hostname:theHost, username:loginName, initial folder:remotePath}
set localStorage to (localStorage as alias)
repeat with theItem in tWindow's remote items
download theItem to localStorage
end try
end repeat
close tWindow
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment