Example of how to upload a file using AppleScript & UNIX Shell?

freaky

OSXer
Is using "do shell script" and cURL really a better way to upload a file than URL Access Scripting? If so, can somebody give me a simple example of how to upload a small text file with this method?
 
So instead of doing this:

Code:
tell application "URL Access Scripting"
    upload file.txt to "ftp://login:password@server.com replacing yes without binhexing
end tell

Would this be correct or do I need to run it inside of a tell statement?

Code:
curl --upload-file file.txt --user login:password ftp://server.com

Can you send me the link to the manual? All I have is is an OReilly book and I can't find a manual for AppleScript on apple.com/applescript or on Google. I guess they have one just like the PHP manual??

Thanks for your help.
 
Sorry, I just meant the curl manpage - lots and lots of useful options (how to use proxies, upload http forms, etc. etc.)

The only manual for applescript I have is the one that came with the developer tools cd - it's installed at /developer/documentation/applescript.

I don't know about how to wrap that into applescript. I'd just write a shell script and run it in the terminal, cuz that's what I know how to do...
 
Back
Top