Computing.Net > Forums > Windows XP > Batchfile to replace the string with another

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Batchfile to replace the string with another

Reply to Message Icon

Name: aswabh
Date: July 23, 2009 at 23:41:05 Pacific
OS: Windows server 2003
Subcategory: General
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: Ed in Texas.
Date: July 24, 2009 at 03:04:31 Pacific
Reply:

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.


0
Reply to Message Icon

Related Posts

See More


help! program w/o class i... Pci simple communications...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Batchfile to replace the string with another

Removing Windows XP Bootloader?!! www.computing.net/answers/windows-xp/removing-windows-xp-bootloader/1111.html

DVD drive causing lockups www.computing.net/answers/windows-xp/dvd-drive-causing-lockups/49211.html

Find and replace string in a file www.computing.net/answers/windows-xp/find-and-replace-string-in-a-file-/138358.html