Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Appending Files (https://www.kinook.com/Forum/showthread.php?t=356)

mvermeulen 03-11-2004 09:24 AM

Appending Files
 
Is there a function or macro that will append the "contents" of one file to another? I would like to create a seperate file that will contain the output of certain steps, manipulate the file and then append it to the log.

Thanks!

kevina 03-11-2004 04:50 PM

If I understand your request, I would recommend this:

1) use script to append the log output of each step you desire to a file, in the step's vbld_StepDone event using the vbld_FSO com object.
2) add a step to manipulate the file (using script or whatever you want to update it to the format you want to add to your log)
3) use a Log Message action to add the contents of the manipulated file to the log

Some vb code you can use to append the contents of one file to another is:

vbld_FSO.OpenTextFile("File1", ForAppending, True).Write vbld_FSO.OpenTextFile("File2", ForReading).ReadAll

Where "File1" is the dest file, "File2" is the source file


All times are GMT -5. The time now is 11:48 AM.


Copyright © 1999-2023 Kinook Software, Inc.