Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,18 @@
|
|||
Function read_line(filepath,n)
|
||||
Set objFSO = CreateObject("Scripting.FileSystemObject")
|
||||
Set objFile = objFSO.OpenTextFile(filepath,1)
|
||||
arrLines = Split(objFile.ReadAll,vbCrLf)
|
||||
If UBound(arrLines) >= n-1 Then
|
||||
If arrLines(n-1) <> "" Then
|
||||
read_line = arrLines(n-1)
|
||||
Else
|
||||
read_line = "Line " & n & " is null."
|
||||
End If
|
||||
Else
|
||||
read_line = "Line " & n & " does not exist."
|
||||
End If
|
||||
objFile.Close
|
||||
Set objFSO = Nothing
|
||||
End Function
|
||||
|
||||
WScript.Echo read_line("c:\temp\input.txt",7)
|
||||
Loading…
Add table
Add a link
Reference in a new issue