Make directories from filename & move file

July 18, 2010 at 22:16:32
Specs: Windows 7

I have a directory set up that stores *.mp3 files.
I need to read the filename of the files, create a directory with only the artist's name and move the *.mp3 file into the new directory. I want to read in the filename from the beginning all the way up to the hyphen.


Filename: Black Sabbath - Crazy Train.mp3
New directory: Black Sabbath

I sort of modified some script from a closely related question on here, but it doesn't exclude the hyphen and everything after it when naming the directory. In addition, even if it did exclude the hyphen and so on, I fear the program would not be successful in moving the file to the new directory since the names would not completely match. Anyone know how to do this? Thanks.

See More: Make directories from filename & move file

Report •

July 19, 2010 at 07:27:42
Free MP3 file manager

Other wise post in the programming forum.

Report •

July 19, 2010 at 08:22:13
I searched through these already and none of them (from what I could find) do what I'm wanting. I went ahead and posted this same question in the programming forum like you suggested.

Report •

July 19, 2010 at 10:43:50
I think you mean you need folders in your directory to sort by artist.

Many of the programs that work with the tags can sort them by different parameters such as genre, artist, date, etc. Once sorted you can highlight a block of them and copy to the folder.

Report •

Related Solutions

July 19, 2010 at 10:56:37
The thing is, I can just do that without a program like that... I can go through and make a folder/directory for each artist and then just go through and select the songs that correspond with the artist and paste them into the artist's folder. I started doing it the manual way, but that got old quick. I basically want to build this small batch file so that this process is fully automated, quick and painless.

I have all my songs that I've obtained over the years sorted in this one folder in alphabetical order based on artist. I just want this program to go in and arrange all of them into their own folders without naming the folder from the entire file name (everything before the hyphen that separates artist name from song name).

Like this:

A Day To Remember - Heartless.mp3
ACDC - Back In Black.mp3

A Day To Remember

Then move files to their corresponding folders to show the following:

:\music\A Day To Remember\A Day To Remember - Heartless.mp3
:\music\ACDC\ACDC - Back In Black.mp3

Does this make more sense what I want it to do?

Report •

July 19, 2010 at 15:25:19
Media monkey can do this pretty well. Not free though.

Report •

October 15, 2010 at 17:05:11
I’m also looking for something like this, I have a lot of files and I need to create folders from the files name and move the files into the folders, when creating the folders’ names I want to exclude everything after the underscore.



Can somebody help me thanks in advance

Report •

Ask Question