How to add a partial phrase to multiple file names at the same time in Windows Explorer?

I have files named 1.png, 2.png, 3.png, etc, going all the way up to 500 image files.

I intend to put a word in front of the number, so the new file names would be alpha-1.png, alpha-2.png, alpha-3.png etc. How can I do this efficiently?


for %f in (*.png) do echo rename "%f" "alpha-%f"

It can get as complicated as you want it to, but for the exact example you ask this will work.

The echo command is so you can see what it will do before you run it. Then delete the echo command.

Also, the windows explorer is really cool this way you can highlight multiple files and then rename them with one name, you will end up with your_title(n).ext where n will be numbered.

Also.. @phuclv example in powershell is just as good (if not better) but more complicated. The sooner people learn a more advanced interpreter, the better ;)


In PowerShell you can use either of these

Get-ChildItem | Rename-Item -NewName { "alpha-" + $_.Name }
ls|ren -Ne{"alpha-" + $_.Name}

The latter is the aliased version of the former. You can also add -WhatIf or -wi to run dry and confirm that the command is correct or not