Batch rename files in Windows from Command Line

This is an easy way to add a prefix to any set of files in a Windows folder, from a command prompt type this

[code]for %a in (*.*) do ren "%a" "prefix – %a"[/code]

 

Tried in Windows 10. Thanks to ofer.sheffer in this Stackoverflow post where there is also an example on how to do this in PowerShell.

One Reply to “Batch rename files in Windows from Command Line”

Leave a Reply

Your email address will not be published. Required fields are marked *