Character substitution in %variable

  • Thread starter Thread starter Rich Pasco
  • Start date Start date
R

Rich Pasco

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
 
Rich said:
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:
 
Back
Top