View Full Version : [other] Help saving lots of time
August 18th, 2011, 01:57 AM
I have a bout fifty folders filled with music files, and i was wondering if there was a way to extract all the files without going into all the folders and doing a copy all then paste into a destination folder. if anyone could help it would be wonderful.
August 18th, 2011, 02:06 AM
I wanted to do the same thing with .iso files from my downloads folder.
for file in `find ~/Music`
if echo $file | grep ".mp3"
mv $file DESTINATION
Replace Music with whatever main directory the folders are in, and if they aren't all mp3s then change that to .* for all files or specify exactly which types. Run it as a script or from the terminal.
Let me know how it goes.
August 18th, 2011, 02:26 AM
actually if you have file different from mp3 just skip line 3 & 4
grep ".*" will look for termination * since is inside double quotes.
also instead of mv i 'd use cp -v just in case you dont loose files.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.