Jump to content

erasing lines from end of file


Recommended Posts

_FileReadtoArray

The for loop, and filewriteline.

But how do you not write the last lines? The secret is in the to of the for loop. see if you can work it out. Hint, expressions can be used... :)

Link to comment
Share on other sites

You could use _FileCountLines to get the number of the last line in the file and then use _FileWriteToLine without any text to delete the line without having to open the file.


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

You could use _FileCountLines to get the number of the last line in the file and then use _FileWriteToLine without any text to delete the line without having to open the file.

Thanks for your responses,

I'v choose the :

$filechange=_FileWriteToLine("c:\0522554720.htm",85, "my replacement for line 85", 1)

it erases the part i don't need from previus action and replaces it with new data continuasly. instead of using "my r...." i will use an $i string that allways changes.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...