I had the problem that the character "-" had to be changed to "_" in multiple files.
The 2 batchfiles below can apply this procedure to all files in theyr folder:
dir /B > filelist.txt
FOR /F "tokens=1" %%i IN (filelist.txt) do (
call _rename.bat %%i
rename %name% %newname%
1) Create _go.bat
(with the above code inside) and put them into a folder.
2) Put some files in this folder, for example test-1.txt
3) Execute _go.bat
(double click it).
4) Your files will be renamed to: test_1.txt