Desktop question
Desktop question
- Subject: Desktop question
- From: "Marc K. Myers" <email@hidden>
- Date: Mon, 22 Jan 2001 17:15:37 -0500
- Organization: [very little]
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".
Even if I don't try to coerce the Finder reference to an alias, I get
the same kind of error when I try to rename the file
tell application "Finder"
set theFile to (duplicate file "Pic 04.jpg")
set the name of theFile to "New Pic O4.jpg"
end tell
--> Finder got an error: Can't set folder "Desktop Folder" of disk
"Communications" to "New Pic O4.jpg".
Could someone tell me (a) why this happens and (b) how to get around it.
All I want to do is dup a file and give it a new name. I can't believe
how much hassle this has been!
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[1/22/01 5:14:06 PM]