Writing a file without line feed.
#8
(07-08-2022, 05:08 PM)SquirrelMonkey Wrote: I tried that. When I type "Print #f2%, line$;" it still adds a character. Sad

That's odd, then I'd say that character is already part of line$ and not added by the PRINT, but as far as I see you use LINE INPUT, which usually skips CRLF.

However, try this:
Code: (Select All)
OPEN "B", #1, "YourOriginalFile"
orgDat$ = SPACE$(LOF(1))
GET #1, , orgDat$
CLOSE #1

newDat$ = StrReplace$(orgDat$, "oldString", "newString")

OPEN "B", #1, "YourNewFile"
PUT #1, , newDat$
CLOSE #1

'include QB64's string tools
'$INCLUDE: 'source\utilities\string.bas'
Just replace the filenames in the OPEN lines and the strings in the StrReplace$() call.
Reply


Messages In This Thread
RE: Writing a file without line feed. - by bplus - 07-08-2022, 04:58 PM
RE: Writing a file without line feed. - by RhoSigma - 07-08-2022, 05:36 PM
RE: Writing a file without line feed. - by bplus - 07-08-2022, 05:10 PM
RE: Writing a file without line feed. - by bplus - 07-08-2022, 05:56 PM



Users browsing this thread: 5 Guest(s)