-
I have an instant messenger program and that logs each users logs separatly. I need to these files to only allow so many lines so they dont grow out of conrtrol.
Any examples on how this can be accompished?
right now its just appending each entry.
Any help is appriciated.
thanks
Garrett
-
you could have your program open it as input and then split it using the vbctlf as the delimiter and then get the ubound of the array that you assigned to the split function and subtract from it the number of entries that you want to include in the file then you loop through and write the entries from the array starting at the number you got from the subtraction to the ubound to the log.
that should limit the lines that are stored in the data file if you don't understand my incesant rambling that is because i have been up for about 38 hours and i appoligize:D
-
hmmmmm
not sure I understand.. im a begginer ;) maybe an example would help? anyone?
If I cant limit this im going to have to nix the log code :(
-
i'll see what i can do but i have to goto sleep so i will post it later tonight(ut us !0:38 Am here and i still havn't gone to bed:D
-
ok go get some sleep.. :)
anyone else have any ideas?
here is a little more info on what I need.
lets say I want to limit the length of the log file to 500 lines. after you reach 500, any lines you add at the top remove the bottom lines to keep it at 500.
Thanks!