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

Moving multiple files from multiple folders into one

Hi,


I have a folder on an external drive that contains a few hundred images. Most images are single images, but about three hundred or so come in folders, one folder for each image plus a text file with the captions. I would like to move the images and files from all of these folders into one folder, so I can open that folder and actually see all of the images in one place. Other than dragging and dropping manually for all 300 + folders, is there a simpler way to move all of these images (and their text files) to one place?


Thanks! 🙂


PS: This is on a Mid 2010 I- Mac 27 inch screen (I believe, but big). It's at my work place, so can't try out anything until I get back there. It runs Yosemite.

iBook G4 (14-inch), Mac OS X (10.4.11), 1.33ghz, 512RAM

Posted on May 22, 2015 9:13 PM

Reply
Question marked as Best reply

Posted on May 22, 2015 9:24 PM

Choose Utilities from the Finder's Go menu, open the AppleScript Editor, double-click the folder with the files, and run:


tell application "Finder"

move (every file of every folder of window 1) to (get target of window 1)

end tell


(127743)

11 replies

May 22, 2015 9:39 PM in response to Niel

Okay, thanks, I'll try this. So, instead of "get target of window 1" should I just write the folder I choose instead? So, if I choose a folder named "Single images," I would write: move (every file of every folder of window 1) to (single images)? Or do I choose it later?

Does this work for folders that are on an external drive? So, I would select the folder on that drive, then select a target folder also on that drive? And what's the number in brackets at the end, I should write that one, too?


Sorry, but new to this and can't really try it out now on my home computer.


Thanks a lot for the help!! 🙂

May 31, 2015 11:18 PM in response to Niel

Tried both commands, but I'm getting error signs such as: ""Finder got an error: Handler can’t handle objects of this class." number -10010" for the first and second script and "Expected “,” but found identifier" while the second "Drivepath" is highlighted for the second one. I think the first part is fine, but maybe I'm doing something wrong with the second part of the script? I have a new folder that contains 900 separate folders with two images each, so it would save tons of time to find the right command.


Thanks! 🙂

Jun 1, 2015 5:08 PM in response to Niel

I gave in the script exactly as shown in your posts. I actually did it on my own computer at home first, I created a sample folder with subfolders and an empty one to move the contents of the subfolders to, just to see if that would work. My computer runs Snow Leopard, the other one Yosemite. Don't know if that would make a difference.


When the above scripts didn't work, I also tried opening up both folders on the desktop and writing something like: tell application "Finder"

move every file from every folder of window 1 to window 2

end tell


I also tried to use the name of the folder to which I wanted to move the files instead of "window 2" and I tried it with and without brackets, but got more error signs.


I'm sure there is a really easy way of doing this, I just haven't found it yet. 😀


Thanks for the help!🙂

Jun 1, 2015 5:25 PM in response to Niel

Okay, so name of Drive that contains the folder first, then the actual name of the folder containing the subfolders? If it's easier, I could also drag the folder with the files and the destination folder onto the desktop and do everything from there.


Sorry for being so dumb, but I've never used any of this before. 😀 I'm actually surprised that Macs don't have a more simple keystroke for something like this.

Moving multiple files from multiple folders into one

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