The string substitution feature can also be used to remove a substring from another string.
@echo off set str = Batch scripts is easy. It is really easy. echo %str% set str = %str:is = % echo %str%
The key thing to note about the above program is, the ‘is’ word is being removed from the string using the :’stringtoberemoved’ = command.
The above command produces the following output.
Batch scripts is easy. It is really easy. Batch scripts easy. It really easy.