Sign in to follow this  
Followers 0
akorx

Delete and write a line in a file

3 posts in this topic

Hi Guys,

Is there a way to delete a line (i know the line numer to delete for exemple it's line 5) of a file and then write another line to this place ?

I know a way :

- load all the file in an array

- do an string replace

- delete the file and write the array in the same file

... but I would like to avoid (i'm french, please help me : we say "would like to avoid" or "would like avoid" ?, :) ) to use an array because my file is very very big. So how can i do ?


AkorxMail akorx@yahoo.fr

Share this post


Link to post
Share on other sites



Hi, akorx. _FileWriteToLine should work for this:

#include <file.au3>

_FileWriteToLine(@DesktopDir & "Test.txt", 5, "Test 12345", 1)

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

Hi, akorx. _FileWriteToLine should work for this:

#include <file.au3>

_FileWriteToLine(@DesktopDir & "Test.txt", 5, "Test 12345", 1)

Ok thanks a lot for your help JLogan3o13 ! i have never seen that there were functions with "_File..." . Each time i was making them !!!

If you got ime don't forget to correct my bad english !

Thx again from France !


AkorxMail akorx@yahoo.fr

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