Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Basic Automator question: move files

Hi, I'm relatively new to Automator. I tried to write an Automator action to do the following but couldn't, so I'm hoping for some help.

Here's what I'd like to do:
1 - Manually open a folder
2- Use an Automator action to select all of the files in that folder, and move them to another folder on my computer. The destination would be the same every time, so preferably that would be programmed into the Automator action.

That's it. Hopefully this is easy. Thanks.

iMac 24" (Intel), MacBook Pro, iBook G3, iPhone, Mac OS X (10.5)

Posted on Oct 31, 2008 11:00 AM

Reply
6 replies

Oct 31, 2008 11:03 AM in response to 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"
end tell

This script assumes the destination folder is on the desktop; if it isn't, use a path such as "Macintosh HD:Users:Shared:folder"

(37246)

Oct 31, 2008 11:15 AM in response to Niel

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.

Nov 1, 2008 12:47 AM in response to JLip

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.

Basic Automator question: move files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.