Search found 2 matches

by dfashimpaur
08 Feb 2013 16:37
Forum: DOS Batch Forum
Topic: Replace substring containing spaces
Replies: 3
Views: 2707

Re: Replace substring containing spaces

@ECHO off SETLOCAL ENABLEDELAYEDEXPANSION SET originalStr="Some text to be processed. Some text may contain Hello World. Some text may contain nothing worthwhile at all." SET strToReplace=nothing worthwhile at all SET replacementString=very important stuff SET str=!originalStr:%strToRepla...
by dfashimpaur
08 Feb 2013 14:17
Forum: DOS Batch Forum
Topic: Replace substring containing spaces
Replies: 3
Views: 2707

Replace substring containing spaces

Hello all. I am trying to create a DOS file which will modify some string data for me. The input strings can be dynamic and the replacement value may need to be empty (no characters) and sometimes it may be a substring containing spaces. This is essentially what I have: @ECHO off SETLOCAL ENABLEDELA...