Results 1 to 3 of 3
  1. #1


    Member Since
    Feb 24, 2007
    Posts
    100
    How can I batch move files to the same folder structure in a different location?
    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

  2. #2

    Raz0rEdge's Avatar
    Member Since
    Jul 17, 2009
    Location
    MA
    Posts
    8,555
    Specs:
    27" i7 iMac, 24" iMac, 13" Macbook Air, iPhone 6S, iPod Nano 7th GeniPad 3
    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.

  3. #3


    Member Since
    Feb 24, 2007
    Posts
    100
    Thanks!
    OS X 10.5.7
    Mac Pro
    2 x 3 GHz Dual-Core Intel Xeon
    8 GB RAM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Spotlight copy files and folder structure
    By Openskies2009 in forum OS X - Operating System
    Replies: 7
    Last Post: 10-26-2014, 08:53 PM
  2. Cant move or copy files from Movies folder, says they are in use?!?!
    By Exodist in forum OS X - Operating System
    Replies: 4
    Last Post: 12-25-2013, 09:54 PM
  3. Using terminal to move files in a specific directory to a new location.
    By Alpha Spartan A in forum OS X - Operating System
    Replies: 2
    Last Post: 12-31-2012, 11:15 PM
  4. Folder icon has a small lock....cannot move files or move to trash
    By gagliano3 in forum OS X - Operating System
    Replies: 3
    Last Post: 05-02-2009, 11:27 PM
  5. Cannot move files out of music folder
    By johnsonl33 in forum iPod Hardware and Accessories
    Replies: 4
    Last Post: 01-05-2007, 09:14 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •