New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Operating System General OS operation information and support

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


Post Reply New Thread Subscribe

 
Thread Tools
nick_harambee

 
Member Since: Feb 24, 2007
Posts: 100
nick_harambee is on a distinguished road

nick_harambee is offline
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.5.7
Mac Pro
2 x 3 GHz Dual-Core Intel Xeon
8 GB RAM
QUOTE Thanks
Raz0rEdge

 
Raz0rEdge's Avatar
 
Member Since: Jul 17, 2009
Location: MA
Posts: 7,433
Raz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant futureRaz0rEdge has a brilliant future
Mac Specs: 27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 5 & 5S, iPod Nano 7th Gen, iPad 2 16GB WiFi, iPad 3

Raz0rEdge is offline
A shell script should be ale to do this. Let me try one out and I'll be back...

Is it safe to say that the only real change is that all the folders have been prefixed with "/Music"? If so, something like this would do the job.

Code:
for file in ‘ls *.jpg‘; do
echo "cp $file Music/$file"
done
Now this assumes you are doing this within the external hard drive directory. Usually /Volumes/<some name>...

For now, this script is just going to print what it's going to do, if it looks correct, you can remove the word "echo" and the double quotes and just leave the "cp" command.

This will

--
Regards
...Ashwin



Be sure to read the Community Guidelines | The more information you provide, the better answers you get, remember GIGO.
QUOTE Thanks
nick_harambee

 
Member Since: Feb 24, 2007
Posts: 100
nick_harambee is on a distinguished road

nick_harambee is offline
Thanks!

OS X 10.5.7
Mac Pro
2 x 3 GHz Dual-Core Intel Xeon
8 GB RAM
QUOTE Thanks

Post Reply New Thread Subscribe


« Did Mountain Lion slow down your machine? | losing www every few minuts »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
Moving iTunes from PC to Mac. Playlists have gone :-( allmacsedout Music, Audio, and Podcasting 8 01-05-2012 08:28 PM
getting zipped files out of emails into a folder Corticus OS X - Operating System 0 12-26-2011 02:33 AM
compare file names and move files applescript carmolim OS X - Apps and Games 1 10-20-2010 03:10 PM
Script to duplicate Apple Lossless iTunes library as MP3 files nick_harambee OS X - Operating System 10 10-02-2010 08:53 AM
Same iTunes under 2 accounts lardyboy Music, Audio, and Podcasting 6 01-16-2008 08:22 PM

All times are GMT -4. The time now is 03:21 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?