Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Lines(fileName)
- Dim Shell : Set Shell = CreateObject("WScript.Shell")
- Dim Exec : Set Exec = Shell.Exec("find /c /v """" " & filename)
- While Exec.Status = 0
- WScript.Sleep 1
- Wend
- Dim s : s = Split(Exec.StdOut.ReadAll(), " ")
- Lines = CDbl(s(UBound(s)))
- End Function
- WScript.Echo Lines("C:\test\test.txt")
Advertisement
Add Comment
Please, Sign In to add comment