• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
tell Finder to move files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tell Finder to move files


  • Subject: tell Finder to move files
  • From: peter <email@hidden>
  • Date: Sat, 2 Aug 2003 18:02:26 +0200

The second finder script in this clicked handler won't work, I have
tested for the results of the variables "thePath" and "destinationPath"
they produce the desired colon delimited paths.

the kind of error I get look like this:
Finder got an error: Can't get file
"OSX:Users:p:Desktop:Cocoa_OpenGL.sit". (-1728)

probably really simple but............

Peter


on clicked theObject
if the name of theObject is "move" then

tell application "Finder"
set prefsFolder to (home as text) & "Desktop:"
end tell
set theRow to selected data row of table view "names" of scroll view
"names" of window "main"
set theFileName to contents of data cell of theRow as string
set thePath to (prefsFolder & theFileName)

set theDestination to title of current menu item of popup button
"folders" of box "box2" of window "main"
set destinationPath to (prefsFolder & theDestination & ":")


tell application "Finder"

move file thePath to folder destinationPath
end tell

end if

end clicked
_______________________________________________
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.

  • Prev by Date: Re: Thanks
  • Next by Date: Re: Quicksort Implementation v1.0.2
  • Previous by thread: Re: Thanks
  • Next by thread: Getting desktop bounds (was: Re: Isn't there a way...
  • Index(es):
    • Date
    • Thread