3710 Views 6 Replies Latest reply: Nov 1, 2008 9:38 AM by JLip
Open the Script Editor in the /Applications/AppleScript/ folder and run the following:
tell application "Finder"
move every file of window 1 to folder "Oct 31"
This script assumes the destination folder is on the desktop; if it isn't, use a path such as "Macintosh HD:Users:Shared:folder"
Thanks. I tried that, and got the following error: Finder got an error: Can’t get window 1.
Instead of Window 1, I tried the name of the folder (it's on the desktop), but it still didn't work.
Separately, is there a way to do this in Automator? I find that to be an easier way to program occasional tasks.
It should be straightforward. These four actions will do it:
Get Specified Finder Items—select the folder you wish to copy from;
Open Finder Items—leave setting as Default Application*;
Get Folder Contents;
Move Finder Items—select the destination folder.
If the originating and destination folders are always the same then you can save this as an application and run it as required. If either folder changes, you’ll have to open it in Automator, change the folders as required, then run the workflow.
*The Open Finder Items action is redundant, but you did say you wanted to open the folder. Can’t see the point really, since it’s about to be emptied.