Unable to clear text in a log file

February 17, 2009 at 23:16:53
Specs: Windows XP
I work with a portal server which actually has log files which get updated while server is running.I was able to clear the text in the log file while the server doesnt run but when i tried to do the same while running the server i couldnt clear the text in the file.
the command i used to clear when the server doesnt run is
for %%f in (C:\wsapps\ebp\deployment\logs\portal.log) do (type nul > %%f)

Can you sugget how to change the command so that i can clear the text while my server is running.


See More: Unable to clear text in a log file

Report •


#1
February 18, 2009 at 10:28:09
if the server is running the file is opened by the server and you'll be unable to make changes to it...

Report •

#2
February 18, 2009 at 10:31:50
which means your batch file would have to end/dismount the app, clear the log file, and then reenable the app.

Might just look at the app console since you can usually set overwrite/clear log parameters there.


Report •

Related Solutions


Ask Question