system
September 14, 2009, 9:34pm
1
(imported topic written by FITZPAW91)
Hi,
I have searched the forum for a way to do this, and all I have found is how to find an existing line and change it. This is not what I want. I am sure it is very easy, but I am still stuck. It probably uses
appendfile {concatenation “%0d%0a” of
but I can’t figure out the syntax.
Thanks
William
Noah
September 14, 2009, 9:42pm
2
system
September 14, 2009, 9:49pm
3
(imported comment written by FITZPAW91)
Thanks
But this replaces an existing line
try something like this, replacing “line you’d like to add” with your line:
I need to add new data, and not replace anything.
William
Noah
September 14, 2009, 10:17pm
4
(imported comment written by NoahSalzman)
Try this action:
// store the file location
parameter “filename” = “C:\somefile.txt”
// add some new text
appendfile {concatenation of lines of file (parameter “filename”) & “%0d%0a” & “some new text” & “%0d%0a”}
// backup the old file (first delete any old backup files)
delete “{parameter “filename”}.bak”
move “{parameter “filename”}” “{parameter “filename”}.bak”
// replace with the new file
move __appendfile “{parameter “filename”}”
system
September 14, 2009, 10:42pm
5
(imported comment written by FITZPAW91)
Hi Noah
That worked, thanks for the help
William