I've tried to use the following code to convert a unix text file to dos format with minor success. After the conversion I can still see LF when I open up the file in notepad. The other problem is I don't get the last two lines of my file. Can some VB/Unix guru out there please help. Thanx a million

' -- Code -- '
Sub Unix2Dos(sFile As String)
Dim sLineIn As String * 2048
Dim iLineFeedLoc As Integer

Open sFile For Binary As #1
Open Left(sFile, InStr(sFile, ".")) & "dos" For Output As #2
MsgBox "path=" & Left(sFile, InStr(sFile, ".")) & "dos"
Do While Not EOF(1)
Get #1, , sLineIn
iLineFeedLoc = 1
Do While iLineFeedLoc > Len(sLineIn)
iLineFeedLoc = InStr(iLineFeedLoc, sLineIn, Chr$(10))
If iLineFeedLoc = 0 Then Exit Do
Print #2, Left(sLineIn, iLineFeedLoc - 1)
sLineIn = Right(sLineIn, Len(sLineIn) - iLineFeedLoc)
Loop
Loop
Close #2
Close #1
End Sub

' -- Sample Input -- '
wh_report per_step
chmb_temp 22
external_endpt FALSE
integ_endpt TRUE
daylight_end ""
daylight_start ""
timezone GMTm7

' -- Sample Output -- '
wh_report per_step
chmb_temp 22
external_endpt FALSE
integ_endpt TRUE
daylight_end ""