Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disksize logs

Status
Not open for further replies.

kruxty

Programmer
Jul 17, 2001
197
PT
Hi,

i'm wondering if there is any tool that can log my disksize every 20h00.

Tkx to all help ;)
 
A very simple but crude way of doing it would be to write a small batch file that does a "dir" on the drive you want, then schedule it as a task to run every 24 hours.

For example, put the following into a file called diskcheck.bat (change the drive letters accordingly) -


c:
cd\
echo %date% %time% >> c:\diskcheck.txt
dir > c:\dctemp.txt
findstr /i "Dir(s)" c:\dctemp.txt >> c:\diskcheck.txt


Echo'ing the time/date enables you to see when it was run. The findstr command looks in the dctemp.txt temporary file for the line that has the disk space remaining listed, so you don't get all the other crap in your end text file.

HTH

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top