类似的东西:
set the file_tgt to (path to downloads as string) as file specification
set file_src to "http://my_file.png"
tell application "URL Access Scripting"
download file_src to file_tgt
end tell
答案 0 :(得分:2)
我自己找到了解决方案:
set the file_tgt to (path to downloads folder as string) & "file.png"
答案 1 :(得分:0)
使用applescript和shell脚本下载目录中托管的文件集合 -
set counter to 0
repeat 36 times
do shell script "curl -f 'http://stage.omatics.com/Images/Devices/Devices/" & counter & ".png' -o ~/Desktop/" & counter & ".png"
set counter to counter + 10
delay 2
end repeat
这将下载这36个文件
http://stage.omatics.com/Images/Devices/Devices/0.png
http://stage.omatics.com/Images/Devices/Devices/10.png
http://stage.omatics.com/Images/Devices/Devices/20.png
--
--
http://stage.omatics.com/Images/Devices/Devices/350.png
在桌面上。
希望这有帮助。