smasshed
asked on
File open for input and output vb.net
In VB6 I could open a file for input then open a file for output and then write any part of a line from the input file to the output file see sample below.
I want to do exactly the same thing in vb.net, I have found example which show me how to read a file and write static text to a file but I can not find any help on how to write a string from the file I just opened and read.
Any help greatlt appreciated.
I want to do exactly the same thing in vb.net, I have found example which show me how to read a file and write static text to a file but I can not find any help on how to write a string from the file I just opened and read.
Any help greatlt appreciated.
Private Sub Form_Load()
Open "C:\Users.ini" For Input As #1
Open "C:\StationID.ini" For Input As #2
Do While EOF(2) = False And EOF(1) = False
Open "C:\Config.NT" For Output As #3
Line Input #2, Temp1$
Print #3, "dos = high, umb"
Print #3, ";device=%SystemRoot%\system32\himem.sys"
Print #3, ";device=%SystemRoot%\system32\emm386.exe"
Print #3, "EMM =RAM"
Print #3, "FILES=80"
Print #3, "device=C:\utils\netid.exe /d:" & Temp1$
Print #3, ""
Print #3, "REM Added by Pervasive.SQL V8 install:"
Print #3, "DEVICE=C:\PVSW\BIN\BTRDRVR.SYS"
Close #3
Line Input #1, Temp$
FileSystem.MkDir "C:\WorkStationIDs\" & Temp$
FileSystem.FileCopy "C:\Config.NT", "C:\WorkStationIDs\" & Temp$ & "\Config.NT"
Loop
Unload Me
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER