Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

isaacc7

macrumors regular
Original poster
Aug 31, 2004
104
0
I have a really large folder that has many many subfolders, like 500 and many of them have subfolders as well. Is there an app or a script or action that will strip all of the files out of the subfolders? I want to eliminate all of the folder heirarchy but retain all of the data. Any suggestions?

Isaac
 

mad jew

Moderator emeritus
Apr 3, 2004
32,191
9
Adelaide, Australia
Could you use Automator if you have Tiger?

Something like Find Finder Items, Where: original folder, Kind: is not folder.

Then, Move Finder Items To new folder.

Did that make any sense? :eek:
 

ToastyX

macrumors regular
Oct 4, 2005
118
0
This is very easy to do in a terminal.

First, create a new folder for the files to go into.
Then open Applications -> Utilities -> Terminal.
Then type in the following, but replace the underlined parts:

find source -type f -exec cp -p {} destination \;

Replace "source" with the path to the folder containing the files.
Replace "destination" with the path to the new folder.

You can drag and drop the folder into the terminal window, and it will type out the path for you.

After the command completes, you will be returned to the prompt, and the new folder will have a copy of the files. Be aware that if you have more than one file with the same file name, only one of them will be in there. If you're satisfied with the results, you can trash the old folder.
 

balamw

Moderator emeritus
Aug 16, 2005
19,366
979
New England
I've used info-zip zip & unzip to do this on occasion, just junk the paths on unzip

Code:
zip -mr folder.zip folder
unzip -j folder.zip


B
 

isaacc7

macrumors regular
Original poster
Aug 31, 2004
104
0
Thanks!

Great ideas guys, I'll try them out later tonight. On a related note, if I burn a DVD from the finder (in tiger), will it be readable on a windows system? I'm trying to both back up my music collection and move it to another computer (which is running windows). Thanks for the info!

Isaac
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.