I\'m writing a simple script to substitute text in an environment variable with other text. The trouble I get is with the substituted or substituted text being pulled from o
Please try the following:
Copy and paste the code into Notepad and save it as a batch file.
@echo off setlocal enabledelayedexpansion set str=The fat cat set f=fat echo. echo f = [%f%] echo. echo str = [%str%] set str=!str:%f%=thin! echo str:f=thin = [%str%]
I hope you're convinced!