Jump to content

Bug in _FileCountLines? reading log files


Recommended Posts

(Noob alert) Hi there trying to cut my teeth on v3 after a while on V2 cant seem to get this _FileCountLines to work correctly when I run it on an 2000 servers backup logs I get There are -245 lines in the file, if I copy the contents over to c:\test.txt it is correct (4 lines)

#include <file.au3>

$CountLines = _FileCountLines("C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\backup04.log")

MsgBox(64, "LOG","There are " & $CountLines & " Lines in the file")

$CountLines = _FileCountLines("C:\test.txt")

MsgBox(64, "LOG","There are " & $CountLines & " Lines in the file")

the log file contains:

Backup Status

Removable Storage did not mount the requested media. The operation was aborted.

----------------------

Link to post
Share on other sites
  • 11 months later...
  • 1 month later...
  • Moderators

I get the same with any type of file, I've even tried text files.......

It always returns a negative

Provide a .txt file your using... and the script your trying to make it work with... and maybe we can help you.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...