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

adding text to a text file.

Status
Not open for further replies.

Matta25

Technical User
Jan 6, 2004
82
US
I there a way to open a text file then on the second line modify the text. this second line has a path\filename on it and it will change week to week based on the date that is included in the filename.
thanks.
 
I have a couple samples on my site that should get you started with this. Go to the samples page on my site, then scroll down to the following discussion to see the links to the scripts:

This script demonstrates how to read a text file, insert two separate strings to the end of a line of data using the fseek, finsblock, and fwrite commands, and then save the modified file. And here is a complementary script that shows how to delete a duplicate line (the two strings must be one after another) from a text file.

aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top