Jump to content

getting last between start and end string of a big file


tom13
 Share

Recommended Posts

I can't edit my previous post because the autoit tags bug then. Anyway, I wanted to say that programs like BareTail can tail the file succesfully while the application is active and writing. So, it is possible. And it also works for me, but for some reason $sText is sometimes empty while it sometimes does show all newly added text. Anyone has any idea what could cause that? Maybe there's an error in my code snippet posted above? Any help is appreciated. Hope I can get this working. :P

Link to comment
Share on other sites

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I can't edit my previous post because the autoit tags bug then. Anyway, I wanted to say that programs like BareTail can tail the file succesfully while the application is active and writing. So, it is possible. And it also works for me, but for some reason $sText is sometimes empty while it sometimes does show all newly added text. Anyone has any idea what could cause that? Maybe there's an error in my code snippet posted above? Any help is appreciated. Hope I can get this working. :P

Try to change your logic of testing changes based on FileSize.

For example test FileTime and read some chunk of data from end of file (for example 10KB) and parse it/compare it with previous data from end of file.

Just idea...

Link to comment
Share on other sites

Okay I will tell you the results once I have tried several other methods.

I was wondering however, do you know why the modified _get_file_handle function does work and the _WinAPI_CreateFile does not, even when setting up shared rights? I feel more comfortable using the intended function, maybe there is a bug in mine (see my post before my previous post).

Edit: everything works now! I had to change my do loop to a while loop.

Thanks a ton, everyone!

Edited by tom13
Link to comment
Share on other sites

Okay I will tell you the results once I have tried several other methods.

I was wondering however, do you know why the modified _get_file_handle function does work and the _WinAPI_CreateFile does not, even when setting up shared rights? I feel more comfortable using the intended function, maybe there is a bug in mine (see my post before my previous post).

Edit: everything works now! I had to change my do loop to a while loop.

Thanks a ton, everyone!

Hey, good work, sorry I didn't get to look at it.

Can you or Larry do a new UDF for tail read/ write to incorporate this? (accepting the original was "badly written" anyway, and, I presume, only worked for ANSI files, if I understand correctly?)

Best, randall

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...