JESUS PEREZ DE ARRILUCEA wrote:

> How can I append/copy 
> text (1 or mutiple lines) to a file?
> 

There can be many ways, depending on where the
source text is and on other factors. Here's a couple of ideas.

If you're scripting (but you can use this approach in
a command-list too, just add the following in the
More Commands section of the button tab):

local mydata=esc(?"line1\nline2\n", ?"\")
file.writeall(?"c:\file.txt", mydata, "a")
;; remove "a" to overwrite file.txt

If you have data in a file and want to append it
to another file the "old DOS way":

*exec dos hide "c:\source file" >> "c:\file.txt"
;; modifier 'hide' above is optional

A variation of the above using variables (more suitable for scripting):

local myfile=?@"c:\file.txt"@ 
local sourcefile=?@"c:\source file"@
local cmd="exec dos hide"
do ( cmd ++ " " ++ sourcefile ++ ">>" ++ myfile

in [EMAIL PROTECTED]@ any character can follow the ? and it will
be taken as the string delimiter. Thus myfile and sourcefile
above are set to "..." including the quotation marks.



Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to