I am trying to batch add text to the titles of several files in a folder. My code works for command line but not PowerShell:
for %a in (*.avi, *.mta) do ren "%a" "My Title - %a"
Could someone help me adapt this to powershell?
Basically I would like to perform the following actions:
Folder Contents:
001-episode.avi 002-episode.avi
I would like to add the name of the show to the file
ShowTitle-001-episode.avi ShowTitle-002-episode.ave
Thank you.
Found this to work as well.
Dir | rename-item -newname { "My Title -" + $_.Name }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With