URL Access Scripting

Hello!
I’m a beginner with AppleScript and my english is BAD :frowning:

I need a script to upload a file from my computer to a server.
I have used this:

tell application “Finder” to set fspec to (choose file)
tell application “URL Access Scripting” to upload fspec to “ftp://utente:password@server/percorso/completo/” replacing no

but there is an errore because a windows appear and tell me (ehehe my english):
I can’t convert some data

What can I do?

Thnak you

Hello Asdrubala,

Your script works fine for me in OS X 10.2.8. Does this work for you (minor changes made)?

set fspec to (choose file) as text
tell application "URL Access Scripting" to upload file fspec to "ftp://utente:password@server/percorso/completo/" replacing no

– Rob

No it doesn’t work…
the display error is:

I can’t transform some data in the requested type

Thanks

My english to :wink:

I’m using “Panther” for a 10 days, and I have the same problem.

My solution :

I’m just guessing now. Do the selected files have non-ASCII characters in the path? Does this work?

set fspec to (choose file) as Unicode text
tell application "URL Access Scripting" to upload file fspec to "ftp://utente:password@server/percorso/completo/" replacing no

– Rob (who is now out of ideas)