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 dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Batch file for file insertion

Status
Not open for further replies.

dparrott

MIS
Jul 26, 2004
201
US
Hey all,

I am not sure this is exactly the right spot for this, but I couldn't find any better place.

Using Windows XP, I need to search through about 10 or 12 files located in one folder, find "%headerinfo%" and replace that word with the entire contents of another file. I would prefer to automate this, so that I pick the file to insert, the folder to search, where to put the output, and the string to search for.

I don't mind doing this by passing parameters to a batch file. I know how to read the parameters and do the looping (I think), but I don't know the find and replace portion of it. Any help would be greatly appreciated.

A batch file would be my first choice, mainly because it will take less time than writing a full-blown .exe. If no one knows how to automate this, I will have to get into a more indepth project.

Thanks in advance,

Danny
 
dparrot,
take a look in the vbscript forum. between the faqs and some simple searching you should find your answer quickly.
regards,
longhair
 
Longhair,

Not really interested in VBScript. If I am going to go through all the trouble for vbscript, might as well use full on VB. Is there a way to do this in DOS?

Thanks,

Danny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top