Forum Discussion

psaxton's avatar
psaxton
Occasional Contributor
8 years ago

Add CRLF into existing file

Hello

 

We are opening a file in Appending mode in a test using JScript

 

How do we add a new line to the file (i.e. CRLF)

 

Paul

 

 

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    What kind of file is it and what code are you using to open the file?  The answer depends a bit on these details.

     

    The reason I say this is because there is a method in aqFile called OpenTextFile which will open a text file for reading, writing, or both.  If it's opened to write, you then have a method off the subsequent object (aqTextFile) called WriteLine which does exactly what you're asking.