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

Move all files from sub folders to parent

Hi there,


This seems a common enough question, but my issue is that I have zero experience of using either scripts or Automator.


I'm moving files from iPhoto and want to change the structure. Presently i've sorted into year groups and then have multiple (hundreds) of sub-folders under that e.g.

- 2017

- Date 1

- File 1

- Date 2

- File 2

- Date 3

- File 3


I want to move all files into the '2017' folder.


Im hoping some wonderful person on the forum can advise how i can setup a script and run it properly. Sorry i'll probably need step by step instruction, but you'll save me probably a day of my life! I have a year for each folder back to 2005!!


Thanks in advance for any assistance,

SuperTrooper

Macbook 15.4 inch (Unibody) Late 200, Mac OS X (10.5.6), None

Posted on May 8, 2018 11:33 AM

Reply
Question marked as Best reply

Posted on May 8, 2018 11:39 AM

Choose Utilities from the Finder’s Go menu, open the Script Editor, and run the following exactly as posted:


tell application "Finder"

set top_folder to (choose folder)

repeat with this_folder in (get folders of top_folder)

move every item of this_folder to top_folder

end repeat

end tell


(160355)

Similar questions

3 replies
Question marked as Best reply

May 8, 2018 11:39 AM in response to SuperTrooper55

Choose Utilities from the Finder’s Go menu, open the Script Editor, and run the following exactly as posted:


tell application "Finder"

set top_folder to (choose folder)

repeat with this_folder in (get folders of top_folder)

move every item of this_folder to top_folder

end repeat

end tell


(160355)

Move all files from sub folders to parent

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