Computing.Net > Forums > Disk Operating System > 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 18, 2009 at 00:43:06 Pacific
OS: Windows XP
CPU/Ram: 2GB RAM
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: Mechanix2Go
Date: February 18, 2009 at 00:52:48 Pacific
Reply:

It's not a DOS issue.

Likely you are running winders and winders has the file locked.


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

M2


0

Response Number 2
Name: nitin663
Date: February 18, 2009 at 01:01:36 Pacific
Reply:

Ya i understand that the file is getting locked but I just want to know whether there is some way out so that i can continue with updating or create a new batch job


0

Response Number 3
Name: tikbalang
Date: February 18, 2009 at 04:22:23 Pacific
Reply:

use ECHO:

(echo nul > %%f)


0

Response Number 4
Name: Mechanix2Go
Date: February 19, 2009 at 02:20:44 Pacific
Reply:

None tht I know of.


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

M2


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 Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Unable to clear text in a log file

Need copy result in my log file (ba www.computing.net/answers/dos/need-copy-result-in-my-log-file-ba/12974.html

want specify enter in a batch file www.computing.net/answers/dos/want-specify-enter-in-a-batch-file/14558.html

How to create a log file in 1 line www.computing.net/answers/dos/how-to-create-a-log-file-in-1-line/12735.html