convert dash to underscore windows

Shell
Setlocal enabledelayedexpansion

Set "Pattern=-"
Set "Replace=_"

For %%a in (*) Do (
Set "File=%%~a"
Ren "%%a" "!File:%Pattern%=%Replace%!"
)

Source

Also in Shell: