Nov 14, 2007 #1 mcs1000 Programmer Jul 3, 2007 26 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 Sep 29, 2004 4,046 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 Jul 3, 2007 26 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 Oct 31, 2001 188 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 Oct 31, 2001 188 US Again this proves the saying that there are many ways to accomplish the same task... Upvote 0 Downvote