Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


May 09, 2007

Don't Let Log File Folders Get Out of Control

Manage their size with CleanDir.js
RSS
View this exclusive article with VIP access -- click here to join |
See More Jscript Articles Here | Reprints | Or sign up for our VIP Monthly Pass!

Log file management can be a difficult job for system administrators because not all applications include built-in features for managing their log sizes and numbers. For example, Microsoft IIS provides the ability to log HTTP and SMTP traffic but doesn't provide any built-in tools for monitoring the amount of disk space the logs use. On my servers, I periodically use Windows Explorer to sort my files by date and delete old log files. Microsoft's BadmailAdmin.wsf script is also useful for managing the size of the Badmail folder on Microsoft Exchange and IIS SMTP servers. However, I wanted a script that could manage all the log file folders on my servers, so I wrote a script called CleanDir.js to do just that.

Introducing CleanDir.js
CleanDir.js limits the size of a folder by deleting files based on the criterion you specify. You can have the script delete files older than a specified number of days (in which case there's no maximum folder size). Alternatively, you can have the script delete the oldest files to keep the folder under a specified number of megabytes (in which case, there's no age limit to the files). . . .

Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

How can I stop and start services from the command line?

...

Microsoft Touts Xbox 360 'Black Friday' Success

Microsoft this week revealed that its Xbox 360 video game console outsold its Sony PlayStation 3 rival 3-to-1 on "Black Friday," which curiously describes the three day weekend after Thanksgiving, a period that unofficially kicks off the holiday selling ...


Task Automation Whitepapers Essential Guide to E-discovery and Recovery for Microsoft Exchange

Continuous Data Protection and Recovery for Microsoft Exchange

Protecting (You and) Your Data with Exchange Server 2007

Related Events Check out our list of Free Email Newsletters!

Task Automation eBooks Spam Fighting and Email Security for the 21st Century

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Patch Management

Related Task Automation Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing