Re: Delete FTP file (What about uploading?)
Re: Delete FTP file (What about uploading?)
- Subject: Re: Delete FTP file (What about uploading?)
- From: EBI Aktivitet <email@hidden>
- Date: Thu, 12 Jun 2003 20:05:28 +0200
Den 03-06-12 19.13, skrev "Joseph Weaks" <email@hidden>:
>
On Wednesday, June 11, 2003, at 07:25 PM, Deivy Petrescu wrote:
>
> Do a man curl and use curl from "do shell script"
>
>
Could you also post an example of of uploading a file via ftp from my home
>
directory, one that includes the username:password? I have been trying to
>
write a droplet to quickly ftp a file to my web space with no interaction.
>
I apparently keep stumbling over the syntax for curl. I've been trying
>
things like:
>
>
on open aliasList
>
repeat with eachFile in aliasList
>
set theFile to POSIX path of eachFile
>
set curlCommand to "curl ftp://www.myuniversity.edu/wwwpub/ -T " &
>
theFile & " & -U usrnm:psswrd"
>
do shell script quoted form of curlCommand
>
end repeat
>
end open
>
>
To be clear, I've yet to get the curl command to work in Terminal. In some
>
variations, I'm getting error 10, nsername/password incorrect. I've tried
>
-u and -U.
>
Thanks for input,
>
Joe Weaks
This should help you getting the syntax right:
tell application "Finder"
set theFileToUpload to "//FolderNameInHomeDir/FileName"
set theURL to "
ftp://User:Password@DNSnameOrIP/FolderName/FileName"
do shell script "curl -T " & theFileToUpload & " " & theURL
end tell
Regards
Adim Lundin
--
EBI
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.