Nov 14, 2007 #1 mcs1000 Programmer Joined Jul 3, 2007 Messages 26 Location GB I need to remove the last CR/LF character from a text file. I have managed to remove the rest of the CR/LF chars using seek. Is there any way to print a line to a file without the CR/LF character or to remove the last character in a file.
I need to remove the last CR/LF character from a text file. I have managed to remove the rest of the CR/LF chars using seek. Is there any way to print a line to a file without the CR/LF character or to remove the last character in a file.
Nov 14, 2007 1 #2 trollacious Programmer Joined Sep 29, 2004 Messages 4,046 Location US Use a semicolon at the end of your Print line. Code: Print #x, variablestring; Lee Upvote 0 Downvote
Nov 14, 2007 Thread starter #3 mcs1000 Programmer Joined Jul 3, 2007 Messages 26 Location GB Damn, Thanks for your answer but I already spent half the day figuring this out. I found out because I'm writing text with no control characters I can just write to the file as a binary file. Thanks again for your help Upvote 0 Downvote
Damn, Thanks for your answer but I already spent half the day figuring this out. I found out because I'm writing text with no control characters I can just write to the file as a binary file. Thanks again for your help
Nov 16, 2007 #4 cyoung Programmer Joined Oct 31, 2001 Messages 188 Location US Another option would be to use the 'Left' statement Print #x, Left(variablestring, len(variablestring) - Len(vbCrLf)) Chris Upvote 0 Downvote
Another option would be to use the 'Left' statement Print #x, Left(variablestring, len(variablestring) - Len(vbCrLf)) Chris
Nov 19, 2007 #5 cyoung Programmer Joined Oct 31, 2001 Messages 188 Location US Again this proves the saying that there are many ways to accomplish the same task... Upvote 0 Downvote
Nov 19, 2007 #6 HughLerwill Programmer Joined Nov 22, 2004 Messages 1,818 Location GB Not so many ... Upvote 0 Downvote