Jump to content

Writing to file


Recommended Posts

How do I write the following contents to a file (c:\Development\vbcommon\LogFile\AutoLab.txt) that has already been created and populated:

Test Number, Test Name, Test Status, Description, Severity.

Note: This information needs to be put at the end of the file.

Thanks,

Will

Link to comment
Share on other sites

How do I write the following contents to a file (c:\Development\vbcommon\LogFile\AutoLab.txt) that has already been created and populated:

Test Number, Test Name, Test Status, Description, Severity.

Note: This information needs to be put at the end of the file.

Thanks,

Will

<{POST_SNAPBACK}>

FileOpen(filename,mode)

filename Filename of the text file to open.

mode Mode (read or write) to open the file in.

  0 = Read mode

  1 = Write mode (append to end of file)

  2 = Write mode (erase previous contents)

Both write modes will create the file if it does not already exist.

FileWriteLine(filehandle,line)

filehandle The handle of a file, as returned by a previous call to FileOpen. Alternatively, you may use a string filename as the first parameter.

line The line of text to write to the text file. If the line does NOT end in @CR or @LF then a DOS linefeed (@CRLF) will be automatically added.

$file = FileOpen(c:\Development\vbcommon\LogFile\AutoLab.txt,1)
FileWriteLine($file,"text")
FileClose($file)
Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...