Did you set fname variable to the label of a file on your system?
Tried the script...Just echos %fname% then closes
There is no echo %fname% instruction in the script. I'm as surprised as you!
but for a secret that has to remain vetween my friend and I, I can't reveal the complete reason why I actually need each line as a variable (one reason that I'm allowed to talk about is what I said before, my other script gets jumpy).
<sigh> Still compressing/decompressing files?
The first block of the script count the records in the file
The second block subtracts 30 from the recordcount and either loads the array from the file (recordcount - 30 is negative) or skips recordcount - 30 records before loading the array
The third block lists out the contents of the array
I can't duplicate your error. There may have been an error when you copied/pasted the code into your editor.
Batch code does cloak and dagger. Who knew?
I'll try the code again...But no, it is not compressing then decompressing files.
But, like I said, the complete reason why I need this must remain between my friend and I, although to help you I will say this:
I need to be able to remove a certain line at will (or automatically if its the first line and there are 31 lines) without directly modifying the text file.
Dias, I was asking for help, not for wasting comments.
EDIT: Code works...almost. It will echo each and every line, and if there is more than 30, doesn't show the first lines...but how can I get each visible line as a variable???