Jump to content

Batch file String question


Recommended Posts


You can do this with a VBScript easily.

With a FileSystemObject you can add lines in ASCII or Unicode text file.

1) Open the file you want to edit

2) Create a temp file

3) Read you source file line by line

4) Add those lines in your temp file

5) When your text is found - InStr(FileLine,Text) - add the extra lines you want

6) When source file is all red then close it and delete it

7) Rename temp file as source file and that's it

I can provide you sample code but if you're not familiar with VBScript, I don't think it will help.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...