Hi all,
Can anyone help me with converting this piece of code to a vbscript.
Dim TheRecord As String
Dim L As Long
Const MaxLength As Long = 336
Open "OldFile.Txt" For Input Access Read Shared As #1
Open "NewFile.Txt" For Output Access Write Lock Write As #2
Do Until Eof(1)
Line Input #1, TheRecord
L = Len(TheRecord)
If L < MaxLength Then
TheRecord = TheRecord & Space$(MaxLength - L)
End If
Print #2, TheRecord
Loop
Close
TIA
Can anyone help me with converting this piece of code to a vbscript.
Dim TheRecord As String
Dim L As Long
Const MaxLength As Long = 336
Open "OldFile.Txt" For Input Access Read Shared As #1
Open "NewFile.Txt" For Output Access Write Lock Write As #2
Do Until Eof(1)
Line Input #1, TheRecord
L = Len(TheRecord)
If L < MaxLength Then
TheRecord = TheRecord & Space$(MaxLength - L)
End If
Print #2, TheRecord
Loop
Close
TIA