Re: Desktop question
Re: Desktop question
- Subject: Re: Desktop question
- From: Bill Cheeseman <email@hidden>
- Date: Mon, 22 Jan 2001 21:18:24 -0500
on 1/22/01 5:15 PM, Marc K. Myers at email@hidden wrote:
>
If I say
>
>
tell application "Finder"
>
set theAlias to (duplicate file "someFile") as alias
>
end tell
>
>
and someFile is on the startup disk's desktop, it works just as I'd
>
expect it to. The variable "theAlias" contains an alias reference to
>
the new copy of the file. But if someFile is on some other volume's
>
desktop, I get
>
>
-->Finder got an error: Can't get folder "Desktop Folder" of disk
>
"Communications".
When you run the script on a file on the other disk, you have to tell the
Finder that it's on the other disk. Something like this:
set theAlias to (duplicate file "someFile" of folder "Desktop Folder" of
disk "Other Disk") as alias
Or maybe just this:
set theAlias to (duplicate file "someFile" of disk "Other Disk") as alias
-
Bill Cheeseman, Quechee, Vermont <
mailto:email@hidden>
The AppleScript Sourcebook
<
http://www.AppleScriptSourcebook.com/>
Vermont Recipes-A Cocoa Cookbook
<
http://www.stepwise.com/Articles/VermontRecipes/>