add text to file

Discuss RoboTask here
Post Reply
johanmartens
Posts: 3
Joined: Fri Jan 15, 2010 12:42 am
Location: Sweden

add text to file

Post by johanmartens »

Hi
I would like to add a string to the begining and end of a textfile that already exist. It have a lot of text in it from the start and it change how many rows there is in it from time to time.
 
The problem is that io cant find a action that is able to add text to file in the begining . only to the end of a file.
 
Thanks for help.
Johan
Oleg
Site Admin
Posts: 3201
Joined: Thu Jan 01, 1970 1:00 am
Contact:

add text to file

Post by Oleg »

Use "Write text file" action.
Write in the body of text something like this:

Code: Select all

Some text at the beginning
**************************
{TextFile(C:\myfolder\My_file_name.txt)}
**************************
Some text at the end
variable {TextFile()} puts the text from specified file.
johanmartens
Posts: 3
Joined: Fri Jan 15, 2010 12:42 am
Location: Sweden

add text to file

Post by johanmartens »

Thanks it works perfekt!!
 
Very nice!
Post Reply