Batchfile to replace the string with another

July 23, 2009 at 23:41:05
Specs: Windows server 2003
i have a text file like this

## PROPERTY TO DECIDE IF THE DEFAULT IS SERVER ##
PROVIDER_URL_REQUIRED = N
TFA_EXTERNAL_LOCATION = C:\\auth.xml

i want to change the value of
PROVIDER_URL_REQUIRED to Y.
Remember there is spaces between
PROVIDER_URL_REQUIRED and '=' sign.
How to solve this using a batch file.


See More: Batchfile to replace the string with another

Report •


#1
July 24, 2009 at 03:04:31
aswabh , I can think of a couple of ways to do it. Use strings a,x,y, and z. Use 'A' as a temporary string. Simply set it = the phrase you want each time and print it (I.E. phrase x,y, or z).
Perhaps even easier is to use a comma delineated phrase (phrase X,Y,Z, etc.) and simply enumerate the phrase you desire along with a print command. Sadly, dunno how to write the batch file, but that's how to program it.
HTH.
Ed in Texas.

Report •
Related Solutions


Ask Question