Search found 2 matches

by Arianax
16 May 2020 13:37
Forum: DOS Batch Forum
Topic: How to create a variable that contains only a SPACE character?
Replies: 1
Views: 823

How to create a variable that contains only a SPACE character?

Hi all,

How do I create a string variable that contains only a single SPACE character?

Code: Select all

SET Variable= 
The above doesn't seem to do anything and the variable returns 'ECHO is OFF' when called with 'ECHO !Variable!'.

Do I need to use %Variable% instead?

Appreciated.
by Arianax
06 Apr 2020 15:19
Forum: DOS Batch Forum
Topic: Special Characters contained in Variable used in String:Replace command...
Replies: 1
Views: 1047

Special Characters contained in Variable used in String:Replace command...

Hi all, Got a tough one for you here. Tried asking this on many other forums but no real answer yet, just workarounds... SET String=Some stuff. Desc=Some more stuff. Some final stuff. SET Rep=CHANGED SET Modify=Desc=Some more stuff. SET "New=!String:%Modify%=%Rep%!" ECHO !New! The problem with the a...