I'm trying to read a file, line by line, into another file. The reason I do it that way is because I need to replace a certain string with another. Details aside, this is generally what I'm doing.
Open inAppPath & "\reg.reg" For Input As #1
Open inAppPath & "\newreg.reg" For Output As #2
Do Until EOF(1)
Line Input #1, strInput
newstring = Replace(strInput, "#APPPATH#", "c:\"
Print #2, newstring
Loop
Close #1
Close #2
Everything is good, EXCEPT there are two characters at the beginning of the fist line of the new file that don't exist in the old one, namely these two: ÿþ
This renders the new file unreadable in some applications. If I encorporate logic to remove the first two characters of the first line of the file copy, then everything works fine. However I'm hesitant to do this because I don't know where those two characters are coming from. Please help
cheyney
Open inAppPath & "\reg.reg" For Input As #1
Open inAppPath & "\newreg.reg" For Output As #2
Do Until EOF(1)
Line Input #1, strInput
newstring = Replace(strInput, "#APPPATH#", "c:\"
Print #2, newstring
Loop
Close #1
Close #2
Everything is good, EXCEPT there are two characters at the beginning of the fist line of the new file that don't exist in the old one, namely these two: ÿþ
This renders the new file unreadable in some applications. If I encorporate logic to remove the first two characters of the first line of the file copy, then everything works fine. However I'm hesitant to do this because I don't know where those two characters are coming from. Please help
cheyney