=sinister= Posted August 4, 2008 Share Posted August 4, 2008 I'm trying to count the lines of a compiled exe application, but the _FileCountLines function does not work with that. Does anyone know how I could do this? Link to comment Share on other sites More sharing options...
picaxe Posted August 4, 2008 Share Posted August 4, 2008 Lines are normally strings terminated by @CRLF or @LF so I wouldn't expect _FileCountLines to work on a non text file line an exe file. Link to comment Share on other sites More sharing options...
rasim Posted August 4, 2008 Share Posted August 4, 2008 I'm trying to count the lines of a compiled exe application, but the _FileCountLines function does not work with that. Does anyone know how I could do this?Only text file have the concept of a "line." Link to comment Share on other sites More sharing options...
=sinister= Posted August 4, 2008 Author Share Posted August 4, 2008 Ok, well what I'm trying to do is read the last "line", or actually a string that is at the very end of a exe file Link to comment Share on other sites More sharing options...
picaxe Posted August 4, 2008 Share Posted August 4, 2008 (edited) Have a look at this tail udf from randallc or this from zorphnog. Both can handle binary files. Edited August 4, 2008 by picaxe Link to comment Share on other sites More sharing options...
=sinister= Posted August 4, 2008 Author Share Posted August 4, 2008 Thta UDF doesn't seem to be working too well, it gives me a windows error every time (THe one with the "Send/Do Not Send" button) Link to comment Share on other sites More sharing options...
picaxe Posted August 4, 2008 Share Posted August 4, 2008 If you are referring to randallc's example, I've updated the link to a newer version. The 2nd link to zorphnog's example definately works. Of course it only gets you the end chunk of the file which you will have to extract your expected strings from. Link to comment Share on other sites More sharing options...
=sinister= Posted August 4, 2008 Author Share Posted August 4, 2008 (edited) Alright, thanks, i'm very close to getting to the end of this. However, I looked through this UDF in a script you linked me, and it works good until it returns the string. It takes the tail and combines it to one string, however when it returns it, it like converts it into a string (I think). --Edit-- Nevermind, simple return issue! THANKS! (I'm not too good when dealing with Binary stuff) Edited August 4, 2008 by =sinister= Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now