Clearing stdout from batch file

July 13, 2009 at 23:12:11
Specs: Windows XP
I would like to clear the stdout from withing a batch file.

For instance, the following call is made:
stuff.bat >> stuff.log

Is there a way to clear out stuff.log inside stuff.bat?

See More: Clearing stdout from batch file

Report •

July 14, 2009 at 00:01:23
@echo off > stuff.log

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


Report •

July 14, 2009 at 00:30:04
Thanks for the reply, apologies, I did not explain myself clearly.

stuff.bat >> stuff.log

start of stuff.bat
@echo Hello
... clear out stuff.log
@echo Tree
End of Stuff.bat

Type stuff.log ...

I cannot change the call stuff.bat >> stuff.log, but I can change the contents of stuff.bat. I need to ensure that stuff.log is emptied before I start writing to it.


Report •

Related Solutions

Ask Question