append log file to secondary log file

July 10, 2009 at 22:41:19
Specs: Windows 2000, 1 GB
I am trying to write a batch file that appends to a secondary log file from a log file that is being written by the system
The system is generating a log.txt file situated at c:\temp\log.txt
I want all the text that is being written on to this log file to be appended to another log file situated as d:\master\masterlog.txt
This should happen whenever a user hits the "ENTER" key on the keyboard
That is to say that the masterlog.txt file should keep adding additional text that was written onto the log.txt file by the system & save automatically

See More: append log file to secondary log file

Report •


#1
July 11, 2009 at 00:28:59
type c:\temp\log.txt >> d:\master\masterlog.txt


=====================================
If at first you don't succeed, you're about average.

M2


Report •

#2
July 11, 2009 at 10:25:10
Thanks Mechanix2Go. I did this but its not appending the text to the masterlog.txt file.
There is a blank file(masterlog.txt) only.
Is there a possibility of appending whenever the "ENTER" key is hit by an user or it appends every 1 minute from the log.txt file to the masterlog.txt file

Report •

#3
July 12, 2009 at 03:36:49
"but its not appending the text to the masterlog.txt file."

Hard to guess how it could miss. This is pretty simple stuff.


=====================================
If at first you don't succeed, you're about average.

M2


Report •

Related Solutions

#4
July 13, 2009 at 01:07:29
I tried again & infact i physically created c:\temp\log.txt file, ran the .bat file & also checked if it wrote back to the d:\master\masterlog.txt file
Nothings happening
Im on Windows 2000 Pro SP4
But ultimately it has to run on an XP machine
Is there any other way to do this. Say it appends every 1 minute, if at all it can

Report •


Ask Question