0
@echo off

:TEST

set /p TEST=TEST: 

echo %TEST%

pause

If I take the above code and input something, for example "This Is A Test", how would I replace all of the spaces with another character, for example a plus sign or a dash?

DavidPostill
  • 7,734
  • 9
  • 41
  • 60
  • Please use the [search](http://stackoverflow.com/search) function next time before asking a question! replacing substrings have been asked numerous times already... – aschipfl Oct 30 '16 at 17:57

1 Answers1

1

Like this :

@echo off

:TEST

set /p TEST=TEST: 

echo %TEST: =+%

pause
SachaDee
  • 9,245
  • 3
  • 23
  • 33