Sign in to follow this  
Followers 0
gleem

writing line to the bottom of a file.

4 posts in this topic

#1 ·  Posted (edited)

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.")

Exit

EndIf

FileWriteLine($file, "Line1")

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

FileWriteLine($file, "Line3")

FileClose($file)

----

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

etc.....

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


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

i think

filewriteline is same as :

filewrite ( "", "blabla" &@CRLF )


My UDF's : Startet on : 06.06.2006_CaseSearchOrReplaceStr();~> Searches OR Replaces a String,;~> With or Without Casesensivity

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  
Followers 0