Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch File 1

Status
Not open for further replies.

RSHH

IS-IT--Management
Aug 16, 2002
19
US
I need to create a batch file that will open a text file, find an entry, replace it and then close the file.

Any ideas?

Cant use VB as it needs to be compatable with as many machine as possible.

Thanks in advance
 
To be honest I haven't tried it myself but I have seen this type of editing done via batchfiles before at my previous firm with a unix cmd called SED. Now the cmd line "sed" works for windows as well.

This could possibly help or do a search for sed on the internet :
 
MOSSOP, that was an excellent suggestion. I found a simple DOS version called wsed.exe at
Even though it's an old DOS version, it worked like a charm on my Win2K Pro machine.

I have been using a windows version of GREP in a batch file to extract data from huge text files. This little tool will allow me to expand it's use.
 
Check that this works in XP Pro. I have used a number of apps like this from DOS-W2K and so far they all bomb out with a memory error in XP.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top