📎 AI Summary:
The thread discusses a user's need to batch rename a large music library to meet specific criteria, including adding, replacing, and formatting parts of filenames using PowerShell. The user finds PowerShell commands and their syntax, especially with get-childitem and rename-item, quite complex and is seeking guidance. A responder explains that PowerShell, being an object-oriented scripting language, can perform these tasks but requires scripting skills, such as using regex and looping through files, to achieve the desired renaming.

djchapple

Extraordinary Member
Joined
Oct 3, 2010
Messages
48
Thread Author #1
I have a large library of music file names (mp3 files) that I need to change to conform to certain criteria.

1. I need to append the two digits "00" to the beginning of certain filenames that do not have a track number
2. I need to replace the two characters "(a space)-", that may appear several times in different places, with a comma ","
3. I need to replace the first two digits (say 09 for instance) in certain file names (digits vary from file to file) with "09(space)-" (i.e I am effectively adding a space and a "-" after the track number

I have seen many examples where get-childitem is used in similar circumstances but I get lost with the bit at the end, that between the {}

So far it seems that I need to use - get-childitem -recurse | rename-item rename {???????????}

I am an experience user of Windows computers and OK with the use of the command line operations. However this command seems so complex and baffles me
 

Solution
What you're talking about using is Powershell, which is a full featured object oriented scripting language and yes it can be complicated and also mostly used by IT professionals to automate tasks.

Get-ChildItem cmdlet is what you would grab all files that you wanted to examine.
With all the files saved in an array you would then need to loop through them all and then very specifically determine which use case applies (probably with regex) and then transform the filename (string) and call Rename-Item

djchapple

Extraordinary Member
Joined
Oct 3, 2010
Messages
48
Thread Author #2
I seem to have posted this in the wrong forum. Can admin relocate it
 

Neemobeer

Windows Forum Team
Staff member
Joined
Jul 4, 2015
Messages
8,995
What you're talking about using is Powershell, which is a full featured object oriented scripting language and yes it can be complicated and also mostly used by IT professionals to automate tasks.

Get-ChildItem cmdlet is what you would grab all files that you wanted to examine.
With all the files saved in an array you would then need to loop through them all and then very specifically determine which use case applies (probably with regex) and then transform the filename (string) and call Rename-Item
 

Solution