Rich Pasco wrote:
> Someone must have thought of an easy way to do this:
>
> I would like to replace every underscore with a blank in %variable
> in a command-shell script (BAT file).
>
> For example, if %%A is
> "The_quick_brown_fox_jumps_over_the_lazy_dog"
> then I would like to quickly generate
> "The quick brown fox jumps over the lazy dog"
>
> I can think of several ways, but they're all pretty long and kludgy.
> Can anybody think of an elegant solution?
>
> - Rich
Here's one of those long, kudgy ways:
> for /F "tokens=1,2,3,4,5,6,7,8,9 delims=_" %%g in ("%%f") do echo %%g %%h %%i %%j %%k %%l %%m %%n %%o
|