I’ve been working on and off on a FTP script. I’ve made some progress but I’m still having troubles.
My Question is what does “-30744 Unsupported scheme” - error mean?
I’ve pasted the script below. TIA
try
set filespec to alias "Ti550:DataFiles:"
with timeout of 120 seconds
tell application "URL Access Scripting" to download "Ftp:****:****@ftp.ode.state.oh.us" to filespec download directory [true] with progress
end timeout
on error errmesg number errNum
if errNum is -128 then
display dialog "You quit downloading a file: the applet " & "will quit now"
else
display dialog (errNum as text) & " : " & errmesg & return & return & "an error occurred during the " & "download. Try running the applet again."
end if
end try
This syntax works for me, or doesn’t work some times. I must tell you that UAS is an app pretty buggy:
tell application "URL Access Scripting"
download "ftp://user:password@ftp.server.com/dir" to file "path:to:whatever:dir:" with download directory and progress
end tell
I’m neither, but a newbie at *nix world. Just type “man curl” in a terminal window and you’ll see lots of options. It allows downloads, uploads, directory listings, use post data, cookies, etc.
However, I can’t find a switch for entire directories. I supposse you must retrieve file listings and download each one individually to replicate the folder structure.
Url Access Scripting, as I told you, is a buggy thing. It never really worked fine for me since OS 8.6 times… The code I posted above works some times, but it also throws several different errors without previous advice.
If you are interested in the “curl” stuff, you could post a new thread asking for it.
There are some alternative command-line utilities, which could be more powerful than “curl”, such as “cURL” or “wget” (but, definitivelly, I’m not a *nix guru ;-))
Thanks for the info. I will look into curl and the other utilities that you mentioned. What I’m trying to do is clear out a directory of deposited files on an ftp server. I need to move the files to an internal server and then process them. I’ve gotten most of the rest done. I just need to get the files where I can process them. Thanks for the advice.
Ok, I’ve been futzing with my script off and on for the past couple of days. When I ran it this morning it launched classic. I’m assuming that it is looking for the Classic Version of URL Access scripting and maybe that is why I’m getting unsupported scheme. I deleted the URL access scripting from my classic system folder but the script still trys to locate it and then locks up.
How do I point my script to the OS X version of URL access scripting?
Simply recompiling it should locate and make valid your script. If you are prompted to locate it, just point to “/System/Library/ScriptingAdditions/URL Access Scripting”
Actually I had to delete the classic version of URL access scripting before it would work. Is there anyway for me to determine what "Unsupported scheme means?