Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tell Finder to move files



for the record Tom has solved this problem for me
Thanks Tom!

Peter

On Sunday, August 3, 2003, at 7:47 PM, Tomasz Kukielka wrote:

Peter,
The following script works for me (regular AppleScript, not Studio):


property prefsFolder : ""
property theFileName : ""
property theDestination : ""
property destinationPath : ""
property thePath : ""

on run

tell application "Finder"
set prefsFolder to (home as text) & "Desktop:"
end tell


set theFileName to "example.txt"
set thePath to (prefsFolder & theFileName)

set theDestination to "some folder"
set destinationPath to (prefsFolder & theDestination & ":")

tell application "Finder"
move alias thePath to alias destinationPath
end tell


end run

The folder path needs to be coerced to alias too. The error you received was misleading

Tom
_______________________________________________
applescript-studio mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-studio
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.