Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Visual Basic to VBScript Help

Status
Not open for further replies.

mukker

IS-IT--Management
Jan 25, 2005
23
0
0
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top