--Save as same file with .txt with below code or use any other txt file and change the path of the file.
Set fso = CreateObject("Scripting.FileSystemObject")
Set theFile = fso.OpenTextFile("D:\VB Programs\Test.txt", 8, True)
WScript.Echo "Number of lines : " &theFile.Line
Set oFso = Nothing
-Output:
Number of lines: 4
Set fso = CreateObject("Scripting.FileSystemObject")
Set theFile = fso.OpenTextFile("D:\VB Programs\Test.txt", 8, True)
WScript.Echo "Number of lines : " &theFile.Line
Set oFso = Nothing
-Output:
Number of lines: 4
No comments:
Post a Comment