• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 547
  • Last Modified:

Need to rename 50,000 MP3 Files best way Help

I have over 50,000 .MP3 files on my USB drive and then number is growing.
Building a SQL database to catalog on the files.

I am trying to cleanup the file names.

I would like them to be this format.

01-AlbumName-SongName.mp3

currently they are
01-Songname.mp3
01 - Songname.mp3
songname.mp3

Been doing a lot of copy and paste, I just copy the album name from the folder name and paste it between two - - then delete spaces etc.  Lots of work

I know of how to rename multiple files using F2 in explorer but that does not give me the results I need.

Would be nice like in excel where you can do a find and replace.

No such option in explorer

Looked at third party apps and they are geared toward photo renaming.

I did see one article saying that in Powershell you can do more but not to familiar with powershell.

Any one have an example or idea on how I can do this with out having to click on each and everyone of the files individually.


Thanks Tom
0
Thomas Grassi
Asked:
Thomas Grassi
3 Solutions
 
John HurstBusiness Consultant (Owner)Commented:
It might be easier to create a text file of the folder(s) containing the files and then working with Excel or UltraEdit (Text Editor with find and replace) and make a new file with old and new names. Add a column with rename in each row. Then you should be able to run the text file.

To capture the file:    dir > file.txt

.... Thinkpads_User
0
 
BxozCommented:
Ant Renamer - is a realy nice app for renaming and it's free !
Have a look
http://www.antp.be/software/renamer/screenshots
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
I've used Mp3tag (free!) for other purposes and it has worked very well:
http://www.mp3tag.de/en/index.html

It also has the ability rename files based on the tag info. This is from the Help file:


Menu Convert > Tag - Filename

You can rename files based on the tag and file information with this converter.

The format string defines the format scheme of the new filename and all placeholders in this format string will be replaced with the information from the file when executing this converter.

Format string

The format string describes the filename scheme for the rename operation based on the tag and file information.

You can use the following placeholders:

%album% Album
%artist% Artist
%comment% Comment
%genre% Genre
%title% Title
%track% Track-Number
%_total% Total number of tracks from xx/xx track-number field
%year% Year
%fieldname% Any other tag field not listed here with the name 'fieldname'. Please have a look at 'View > Extended Tags...' for an overview of all available tag fields in your file.

It also has a built-in scripting function that works with the tag-filename converter. Download is here:
http://www.mp3tag.de/en/download.html

Regards, Joe
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
SubsunCommented:
Try this code and see if you get the expected result..
GCI C:\MP3 -Recurse -Include *.mp3 | % {
$Name = $_.Name -split "-",2
	If (($Name | measure).Count -eq 1){
	Ren $_.Fullname "01-$(($_.DirectoryName -split "\\")[-1])-$($Name[0].Trim())" -WhatIf
	}Else{
	Ren $_.Fullname "$($Name[0].Trim())-$(($_.DirectoryName -split "\\")[-1])-$($Name[1].Trim())" -WhatIf
	}
}

Open in new window

I have added  -WhatIf parameter which will simulate the renaming.... remove -WhatIf and run the code to perform the actual renaming of files..

PS : This is a basic code, I have not added any error control or logging..
0
 
Thomas GrassiSystems AdministratorAuthor Commented:
Thanks to all who responded

All suggestions will save me a ton of work.
0
 
Joe Winograd, EE MVE 2015&2016DeveloperCommented:
You're welcome. Happy to help. Good luck with the project. Regards, Joe
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now