Answer the question
In order to leave comments, you need to log in
VBS. How to determine the number of lines in a file and display dynamically?
Good day. There is a text file list.txt in which the contents are constantly changing, about once a second. It is necessary to display the number of lines in the information window, also with an interval of a second. When you click on the "OK" button, exit. I am not strong in scripts, I found a similar example:
Dim fso, ts
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile("c:\test.txt")
s = ts.Readall
ts.close
x =ubound(Split (s,vbCrlf))+1
WScript.Echo "Количество строк: " & ubound(Split (s,vbCrlf))+1
Do
loop
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question