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

modify specific character positions in a text file??? 1

Status
Not open for further replies.

kskinne

Technical User
Oct 8, 2004
169
US
I have very large text files (over 200,000 rows) that I need to modify.

Each row in each file is 211 characters long, and I need to modify all of the rows by replacing the four characters in positions 41-44, with the characters '9999'. The four original characters vary from row to row and are never the same across rows.

Is there a way I can do this with vbscript and if so does anyone have a little code snippet they could share?

Or else does anyone know of a way I could do this without script? Any programs available that would automate this task?
 
Have a look at the FileSystemObject and the Mid function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thank you - I'll look into that

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top