Re: Duplicate command syntax
Re: Duplicate command syntax
- Subject: Re: Duplicate command syntax
- From: Matthew Smith <email@hidden>
- Date: Thu, 04 Jul 2002 12:59:21 +1000
on 04/07/2002 12:29, email@hidden at email@hidden wrote:
>
I've got the Applescript manual right in front of me, but I must be missing
>
something really obvious. Can anyone tell me what's wrong with this script?
>
>
tell application "Finder"
>
duplicate "Macintosh HD:file1.htm" to "Macintosh HD:file2.htm"
>
end tell
>
>
If I run it, I just get a "can't set Macintosh HD: file1.htm to Macintosh
>
HD:file2.htm" error. I wish it would tell me why.
You are telling the Finder to duplicate a string to another string.
Shouldn't you be duplicating a file?
tell application "Finder"
set newFile to duplicate file "Macintosh HD:file1.htm" to folder
"Macintosh HD:"
set name of newFile to "file2.htm"
end tell
--
Matthew Smith
_______________________________________________
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.