or Connect
AppleInsider › Forums › Software › Mac OS X › How can I batch move files to the same folder structure in a different location?
New Posts  All Forums:Forum Nav:

How can I batch move files to the same folder structure in a different location?

post #1 of 6
Thread Starter 
Hi,
 
I recently had an issue with my iTunes Library so I used the Organize Library feature to have iTunes organise my library. What happened was that it put all of my music in a folder called 'Music' on my external hard drive, whereas previously it was not in a folder at all, e.g.
 
BEFORE: External Hard Drive / Abba / Greatest Hits / Mama Mia.m4a
 
AFTER: External Hard Drive / Music / Abba / Greatest Hits / Mama Mia.m4a
 
I don't have any particular issue with the updated folder structure, except that I had copies of the artwork for each album in my album folders, and these weren't moved when the audio files were moved/consolidated/organised. So I need to find a way of moving all of the artwork to the new folders, e.g.
 
External Hard Drive / Abba / Greatest Hits / folder.jpg
 
needs to become:
 
External Hard Drive / Music / Abba / Greatest Hits / folder.jpg
 
I have to do this for 3,000+ albums, and I have multiple artwork files for some albums, so I am hoping that there is a way of doing this using a batch/automated method of some kind, but I haven't been able to turn up anything yet.
 
Can someone help with this?
 
Thanks,
 
Nick
OS X 10.6.2
Mac Pro
2 x 3 GHz Dual-Core Intel Xeon
8 GB RAM
Reply
OS X 10.6.2
Mac Pro
2 x 3 GHz Dual-Core Intel Xeon
8 GB RAM
Reply
post #2 of 6

The following bash script will give you all the files with their relative path.

Somehow you'll need to exclude the 'Music' directory there, and then move the files one directory down by adding 'music' to the path.

 

#! /bin/bash

for file in `find . -name \*.txt -print`
do
        if [ -f $file ]
        then
                echo $file
        fi
done

 

Sorry for this incomplete answer, but I haven't got the time to dig deeper in the bash scripting.

post #3 of 6
You could just Cmmnd A and drag everything from your old directory and drop it into the new music folder by holding the option key to copy all contents. Might be easier.
post #4 of 6
Quote:
Originally Posted by RobM View Post

You could just Cmmnd A and drag everything from your old directory and drop it into the new music folder by holding the option key to copy all contents. Might be easier.

If I've well understood, he has already the music files in that directory and wants to join the covers...

post #5 of 6
Yup - he has. I am suggesting op overwrites his Library.
Needless I know - some may even suggest "inelegant" when all that's missing is the album art. But it may be the fastest way to consolidate everything. :-)
post #6 of 6

Yes, indeed...

But depending on the size of the library ;)

 

Python or AppleScript could also do the job, you just need a bit of time to write it.

New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Mac OS X
AppleInsider › Forums › Software › Mac OS X › How can I batch move files to the same folder structure in a different location?