Computing.Net > Forums > Windows XP > create bat file to purge 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.

create bat file to purge log file

Reply to Message Icon

Name: terencechua
Date: October 8, 2009 at 20:18:29 Pacific
OS: Windows XP
Product: Dell Latitude d830 notebook - customizable
Subcategory: General
Tags: bat
Comment:

Hi any expert here can help me in creating bat file for window.

actually what i need is create a bat file to monitor a log file size and purge it. because the file size will keep growth fast.

now what my plan to do is:-
1) move/rename the file reach 1Gb size to a file name with running number at the end of the file. example
"TestFileXXX.log"
2) copy top 20line of the log file (TestFileXXX.log) into other log file "TimeMonitor.txt" (for monitor purpose) then zip and delete the TestFileXXX.log file.

end result in the folder may have the below file list

TestFile001.zip
TestFile002.zip
TestFile003.zip
TestFile004.zip
...
...
TimeMonitor.txt

best regard
terence chua



Sponsored Link
Ads by Google

Response Number 1
Name: Ewen
Date: October 8, 2009 at 22:47:56 Pacific
Reply:

You should post this in the Programming Forum... the link is on the right hand side of this page.

Home Page http://ewen.uuuq.com/


0

Response Number 2
Name: terencechua
Date: October 8, 2009 at 23:42:40 Pacific
Reply:

ok thanks

Best Regards
Terence Chua


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: create bat file to purge log file

Output to a log file using bat file www.computing.net/answers/windows-xp/output-to-a-log-file-using-bat-file/175506.html

Hyperlink to .Bat file w/ parameter www.computing.net/answers/windows-xp/hyperlink-to-bat-file-w-parameter/142375.html

Is it OK to delete .log files www.computing.net/answers/windows-xp/is-it-ok-to-delete-log-files/163472.html