Saturday, December 1, 2007

HowTo: Move Multiple Files Recursively

There are times we need to move thousands of data files into once central location recursively for further data processing considering.

Here's a quick blog entry on how to rename multiple files recursively and move them into one folder location having Related entry with the previous posts.

Supposed that you have a collection of MP3 songs and albums and you wish to move them into one folder location for further group album classification and data processing, simply do the following approach on moving multiple files located from subdirectories.

# cd /tmp/allsongs
# find /tmp/allsongs -name "*.mp3" -exec mv {} /tmp/newlocation \;

All *.mp3 songs located from /tmp/allsongs folder location, regardless of filename, would be permanently moved into /tmp/newlocation folder and repeat this process recursively using find with exec parameters.

Classic and simple.

HTH

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy