Re: Why is copying a file so hard? part 3
Re: Why is copying a file so hard? part 3
- Subject: Re: Why is copying a file so hard? part 3
- From: email@hidden
- Date: Wed, 22 Jun 2005 15:14:15 +1000
At 4:39 PM -0700 17/6/05, Paul Berkowitz wrote:
Several of the replies showed how to convert POSIX paths into
aliases:
set foo to "/Volumes/1GIG/ SPELEAN/ Spelean data"
set foo to POSIX file foo as alias
Do the same with your destination path, then do the duplication command in
the Finder using the correct alias objects.
OK I've tried that with no success
set the_error to ""
set foo to "/Users/andrew/Desktop/fish_letter.doc"
set source to POSIX file foo as alias
set foo2 to "/Users/andrew/Desktop/fish_letter copy.doc"
set dest to POSIX file foo2 as alias
tell application "Finder"
try
duplicate source to dest with replacing
on error errMessage
set the_error to the_error & " copying " & foo & "
failed - " & errMessage
end try
end tell
The error I get is
Can't make file "Tiger:Users:andrew:Desktop:fish_letter copy.doc"
into type alias.
Cheers, Andrew Pavey
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden