I
Isis
I am reading the contents of a file - parsing it with an access function
- then writing out a new file which I feel should be identical to the
original but with a new name. My code is;
Dim str1 As String, str2 As String
Open "D:\Test.txt" For Input As #1
Do While Not EOF(1)
str1 = Input(1, #1)
str2 = str2 + str1
Loop
Close #1
Open "D:\email\Test1.txt" For Output As #1
Print #1, str2
Close #1
Test1.txt always ends up 2 bytes longer than the original - two
characters are added to the end of the file - 0D & OA - does anyone know
how to stop this happening ?
For clarity - in my actual application my output file will have been
processed and would not be the same as the input file - but these two
characters mess up what I need the output file for - which is a CSV
import into another program.
Any help wth this would be most helpful.
Thanks
- then writing out a new file which I feel should be identical to the
original but with a new name. My code is;
Dim str1 As String, str2 As String
Open "D:\Test.txt" For Input As #1
Do While Not EOF(1)
str1 = Input(1, #1)
str2 = str2 + str1
Loop
Close #1
Open "D:\email\Test1.txt" For Output As #1
Print #1, str2
Close #1
Test1.txt always ends up 2 bytes longer than the original - two
characters are added to the end of the file - 0D & OA - does anyone know
how to stop this happening ?
For clarity - in my actual application my output file will have been
processed and would not be the same as the input file - but these two
characters mess up what I need the output file for - which is a CSV
import into another program.
Any help wth this would be most helpful.
Thanks