hacksawbob 0 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. ---------------------- Share this post Link to post Share on other sites
Andre 0 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! Share this post Link to post Share on other sites
hacksawbob 0 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 Share this post Link to post Share on other sites
hacksawbob 0 Posted February 15, 2005 I think the issue is that the .log files are unicode text file format and they need to be ansi... Share this post Link to post Share on other sites
hacksawbob 0 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 Share this post Link to post Share on other sites
laurin1 0 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 DavisMCSA, ZCE, A+, N+http://www.laurinkeithdavis.com Share this post Link to post Share on other sites
strik3r0475 0 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! Share this post Link to post Share on other sites
SmOke_N 211 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. Share this post Link to post Share on other sites