PDA

View Full Version : Copying a file with AppleScript


Fahrvergnuugen
January 11th, 2004, 01:25 PM
(applescript newb here)

Can someone tell me how to do this?
I want to copy a file from one folder on one volume to another folder on another volume. I can't figure it out.

Urbansory
January 11th, 2004, 02:53 PM
I'm actually working on that folder action, well working out the bug for that folder action. This script copies "MyNewFile2" to my backup volume "Backup"...

tell application "Finder"
copy file ((path to desktop folder as text) & "MyNewFile2") to disk "Backup"
end tell

I stopped working on the folder action, when i get bored, i might give it a go again.

Fahrvergnuugen
January 11th, 2004, 05:03 PM
I managed to figure it out... i needed to create the string as an "alias" and i had to copy to a folder not to a file. this applescript language is pretty goofy :P