FileCopyFilter: help me re-arrange my tunes?
February 23, 2006 5:53 PM   RSS feed for this thread Subscribe

FileCopyFilter: I need a COPY statement or looping BATCH file which will put my mind at ease. Well, actually, put my music where it belongs.

(This is Windows XP)

I have a series of files in directories that look like this:

c:\Music\[Band Name]\[Album Name]\LQ\*.mp3
c:\Music\[Band Name]\[Album Name]\MQ\*.mp3

"LQ" is the low quality version of the song, and "MQ" is the medium quality version of the song. So, the directory name is identical up to "LQ" or "MQ", and the files in both "LQ" and "MQ" have identical names.

I need to copy these files to a different drive, separating the directories entirely by quality. So, I want them moved to:

d:\Music\LQ\[Band Name]\[Album Name]\*.mp3 and
d:\Music\MQ\[Band Name]\[Album Name]\*.mp3

There are about 12,000 files to be copied.

I'm in a relative hurry (need to do this tonight). So, I don't want to dig all over the net for specialized file copying tools if I can avoid it, and I don't want to dig out my BATCH file documentation and start trial and erroring it.

If this can be done with a simple COPY command (using built in COPY) or a looping batch file, can one of you gurus please write it out for me? If so, thanks!
posted by Dunwitty to computers & internet (9 comments total)
Or an XCOPY statement, that would also be fine.
posted by Dunwitty at 5:57 PM on February 23, 2006


Do you use any sort of media management software? Why not make a Smart List for each quality setting, then rename the files according to a filename mask, shifting the LQ/MQ/etc up a couple of levels in the tree?
posted by meehawl at 5:59 PM on February 23, 2006


Alright, dude. Because I'm friendly, bored, and wise in the ways of scripting, I've created for you this script.

Save it to your desktop and open it in Notepad. Pay attention to the comments in the beginning. If it looks kosher, rename it to "namething.vbs", and then double-click on it. Give it a little time to do its work.

It copies files instead of moving them, so just in case anything gets messed up, you can delete its target folder and be no worse off. If it spits out an error at you, let me know. I tried it on a test set of folders I created, and it worked.
posted by CrayDrygu at 7:18 PM on February 23, 2006


Oh, I just noticed that you want things going to a totally seperate drive. So edit the "moveTo" line in the script to be "D:\Music", save it, and run it. If you edit nothing, it'll move things to "C:\Music2".

When it's done you might want to right-click each "Music" folder and click properties, and make sure they're each the same size, then pick a few folders at random and make sure the right stuff's in there. There's no reason it shouldn't work right, but computers do lots of things for no reason.
posted by CrayDrygu at 7:23 PM on February 23, 2006


Thanks, CrayDrygu, I'll take a look at this tonight. Perhaps it's time for me to get re-acquainted with scripting again, anyway. It's been a long time.
posted by Dunwitty at 9:34 PM on February 23, 2006


Scripting is to batch files what a car is to a skateboard. I highly recommend getting (back) into it. Microsoft themselves have some great scripting resources with lessons and code examples.

I made some edits to the script, it's functionally 100% the same, but I added comments in the code to explain what's going on.

If you've got questions on how the script works, or scripting in general, feel free to email me at the address in my profile.
posted by CrayDrygu at 10:05 PM on February 23, 2006


Previous thread on music file rearranging:

http://ask.metafilter.com/mefi/32787

posted by Caviar at 6:09 AM on February 24, 2006


Thanks again, CrayDrygu. The script works well, and it's easy to modify. I'll add collision detection today (had to postpone last night's copying - dinner went late, and included beer).
posted by Dunwitty at 3:23 PM on February 24, 2006


Glad to be of service :)
posted by CrayDrygu at 7:47 PM on February 24, 2006


« Older Why do I sneeze when I squeeze...   |   How would I go about giving gu... Newer »
This thread is closed to new comments.