Computing.Net > Forums > Windows XP > Unable to clear text in a log 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.

Unable to clear text in a log file

Reply to Message Icon

Name: nitin663
Date: February 17, 2009 at 23:16:53 Pacific
OS: Windows XP
Subcategory: General
Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: fgdn17
Date: February 18, 2009 at 10:28:09 Pacific
Reply:

if the server is running the file is opened by the server and you'll be unable to make changes to it...


0

Response Number 2
Name: wanderer
Date: February 18, 2009 at 10:31:50 Pacific
Reply:

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.


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: Unable to clear text in a log file

Hidden text in a graphic file www.computing.net/answers/windows-xp/hidden-text-in-a-graphic-file/136423.html

Batch file to replace text in a tex www.computing.net/answers/windows-xp/batch-file-to-replace-text-in-a-tex/133565.html

Use Batch to sort lines in a text f www.computing.net/answers/windows-xp/use-batch-to-sort-lines-in-a-text-f/165530.html