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

Log file with newest entry on top

Status
Not open for further replies.

GKatReliable

Programmer
Jul 2, 2002
45
0
0
US
I want to create and maintain a log file for the user that shows the most recent entry on top. I am adding a date and time stamp to the log file entry. This is a pure text file.
I _WANT_ CR/LF's. I find that for whatever reason, adding TEXT to fopen does not add CR/LF with fputs. I tried FWRITE with `r`n and got Unexpected Escape Sequence.
I thought I could read the text file into a variable, then write out the new line and write out this variable after it, thereby putting the new line on top. This isn't working. For one thing, it is not overwriting the file with this technique. I've been searching the aspectscript website and this forum and good old Procomm script help for tidbits.

Regards,
Glenn Koproske
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top