Jump to content
Sign in to follow this  

writing line to the bottom of a file.

Recommended Posts

I am trying to use the filewriteline command and found the example:

$file = FileOpen("test.txt", 1)

; Check if file opened for writing OK

If $file = -1 Then

MsgBox(0, "Error", "Unable to open file.")



FileWriteLine($file, "Line1")

FileWriteLine($file, "Line2" & @CRLF)

FileWriteLine($file, "Line3")



however, in the syntax... it states that it needs a line number. what I am looking to do is write have it write a line to the end of a file. or append the line I want writen to the bottom of the text.

so basically it will look like..

Line 1

Line 2

Line 3

Line 4


Edited by gleem

Share this post

Link to post
Share on other sites

FileWriteLine isn't asking for a line number, it's asking for what you want written to the last line in the file. The @CRLF is done automatically.

FileWriteLine("Filename", "InfoToWrite")

Nomad :D

Ah.. I see.. thank you

Share this post

Link to post
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
Sign in to follow this  

  • Create New...