convert dash to underscore windows code example
Example: convert dash to underscore windows
Setlocal enabledelayedexpansion
Set "Pattern=-"
Set "Replace=_"
For %%a in (*) Do (
Set "File=%%~a"
Ren "%%a" "!File:%Pattern%=%Replace%!"
)
Setlocal enabledelayedexpansion
Set "Pattern=-"
Set "Replace=_"
For %%a in (*) Do (
Set "File=%%~a"
Ren "%%a" "!File:%Pattern%=%Replace%!"
)