Posted on 2005-05-05
Last Modified: 2012-06-27
I am using FSO to Write Lines to a Text File..
is it True whenever I write a line to a text file, it puts a Carriage return at the end of that line?
if yes then how Can I get rid of Carriage Return?

i have following file written with FSO..

HBOL20050505SKYNET          YFSY4927346525
NBOLSHSKYNET WAREHOUSE                             481 KINGS HIGHWAY                            BROOKLYN           NY11223
NBOLCNhutsko, greg                                 2619-a colby st.                             dallas             TX75204-352
DBOLBX1           SONY KDE-42XS955 42-IN HDTV Plasma WEGA™ Tele           150

and our vendor are saying the following

"You are sending a carriage return line feed at the end of each line.  We need you to send a new line or a line feed."

And this is the Sample from them..

HBOL20031001ROYAL           YFSY016164269
NBOLSHEXAMPLEACCOUNT, INC                          1234 MAIN ST                               OKEMOS             MI48864    USA
NBOLCNCAL. OFFICE FURNITURE, INC.                  1724 10TH ST.                                SACRAMENTO         CA95814    USA
SBOLYFSY20031001P126939           110916SLC
DBOLCT2           CHAIRS OR STOOLS, SUB 6                      80590S6    0000070125                                              126939
DBOLCT2           CHAIRS OR STOOLS, SUB 6                      80590S6    0000123125                                              126939
DBOLCT5           CHAIR DESKS OR COMBOS, WITH                  80540S1    0000238300  

now how can we tell where the carriage return was used, and how can I get rid of it?

Question by:khansoul
    LVL 29

    Accepted Solution

    WriteLine always places a carriage return at the end of the string.

    Write does not.

    Use fso.write (string) & vbLF to write a line with only a line feed at the end.
    LVL 10

    Expert Comment

    I had thought it added CRLF (which is a new line) so another you could do ... is just add

    fso.WriteLine vbLf & (string)

    But I believe rdivilbiss's comment is a better way to do it anyways

    Author Comment

    Thanks, I had it figured already thought.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
    I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now