willwatters 0 Posted February 2, 2005 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 Share this post Link to post Share on other sites
Blue_Drache 260 Posted February 2, 2005 (edited) 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 February 2, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Share this post Link to post Share on other sites