|Not sure I'm with you. As written, it asks for a string. You could hardwire it.|
Or you can have it process a file:
@echo off > newfile & setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%a in (myfile) do (
set str=!str: =_!
echo !str!>> newfile
If at first you don't succeed, you're about average.