hacksawbob Posted February 15, 2005 Posted February 15, 2005 (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. ----------------------
Andre Posted February 15, 2005 Posted February 15, 2005 Hi, Check your backup04.log and see if it is containing @CR @LF at the end of each line. Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!
hacksawbob Posted February 15, 2005 Author Posted February 15, 2005 (edited) Ok I give in how do I do that, I have opened it with crimson editor and used show line break, each line has one. Is there another way to get this info? Edited February 15, 2005 by hacksawbob
hacksawbob Posted February 15, 2005 Author Posted February 15, 2005 I think the issue is that the .log files are unicode text file format and they need to be ansi...
hacksawbob Posted February 15, 2005 Author Posted February 15, 2005 (edited) Right got it I will redirect the 'type' DOS command to a text file and alter that. Thanks any way I'll probably be along in a bit with more Q's! Edited February 15, 2005 by hacksawbob
laurin1 Posted January 27, 2006 Posted January 27, 2006 Right got it I will redirect the 'type' DOS command to a text file and alter that.Thanks any way I'll probably be along in a bit with more Q's!How do you mean? I'm having the same problem. Keith Davis MCSA, ZCE, A+, N+ http://www.laurinkeithdavis.com
strik3r0475 Posted March 10, 2006 Posted March 10, 2006 I think the issue is that the .log files are unicode text file format and they need to be ansi...I get the same with any type of file, I've even tried text files.......It always returns a negative Fight Spam! Click Here!
Moderators SmOke_N Posted March 10, 2006 Moderators Posted March 10, 2006 I get the same with any type of file, I've even tried text files.......It always returns a negativeProvide 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.
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