Question Tag & Rename Meta-tag Software (tagging songs from file name)

irvinparrett

Distinguished
Jun 6, 2011
120
0
18,680
Tag & Rename Meta-tag Software (tagging songs from filename)
Tag & Rename Meta-tag Software (tagging songs from filenames).
I am trying to tag song title from the file name for mp3. each of the file names has a number. for example 04 DEADPOOL.mp3 is filename. I want to remove the first 3 spaces of the filename. I also want to capitalize first letter of 04 DEADPOOL.mp3 in the title and the rest of the name in small letters. to read Deadpool
Anyone help me figure out the masking editor command for this
 

Ralston18

Titan
Moderator
Parsing:

The general process would be to set up a loop using Powershell.

The loop would read through all of the filenames in a given folder.

As each file name is read the file name would be parsed to remove the first 3 characters of the filename.

Then then next action would be to change the remaining characters to lowercase.

And after that, capitalize the first letter of the file name. Likely to require another parsing.

Here is a link that will provide some general guidance:

https://www.powershelladmin.com/wiki/Renaming_files_using_PowerShell

You can easily find additional links by googling words and phrases such as "Powershell parsing and renaming files".

Write a script and test. Try one parse/manipulation at a time. Get that to function. Then go to the next step.

I.e., remove the first 3 characters - get that working.

Then change to lowercase, then capitalize the first letter.

See what works or does not work.

Do be sure that you work on copies of the files and that the original files are safely backed up just in case your script goes astray.

If there are problems - post your script and explain what is going wrong.
 

britechguy

Commendable
Jul 2, 2019
1,479
243
1,340
The above is definitely correct, but there's more.

PowerShell, unlike Command Prompt, has very robust support for regular expressions, and those would be a godsend in a case like this.

https://duckduckgo.com/?q=PowerShell+regular+expressions

It is a simple matter to tear apart the file name ahead of the .mp3 extension into component parts and put it all back together.

Getting into regular expression syntax and assignment to regex variables is beyond the scope of what I want to write here. There are myriad tutorials on regular expressions, and I do have to say that they are not easy to learn, or at least learning how to construct really powerful ones generally isn't, but it's not impossible. Once you understand them it unleashes an entirely different level of scripting.