Computing.Net > Forums > Windows XP > Clearing stdout from batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Clearing stdout from batch file

Reply to Message Icon

Name: lau
Date: July 13, 2009 at 23:12:11 Pacific
OS: Windows XP
Subcategory: General
Comment:

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?



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: July 14, 2009 at 00:01:23 Pacific
Reply:

@echo off > stuff.log


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

M2


0

Response Number 2
Name: lau
Date: July 14, 2009 at 00:30:04 Pacific
Reply:

Thanks for the reply, apologies, I did not explain myself clearly.

Call:
stuff.bat >> stuff.log

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

Type stuff.log ...
Tree

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.

Thanks


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows XP Forum Home


Sponsored links

Ads by Google


Results for: Clearing stdout from batch file

Change hostname from batch file? www.computing.net/answers/windows-xp/change-hostname-from-batch-file/159541.html

run reg file from batch file www.computing.net/answers/windows-xp/run-reg-file-from-batch-file/133237.html

Detect USB drive path from batch file www.computing.net/answers/windows-xp/detect-usb-drive-path-from-batch-file/179662.html