[prev in list] [next in list] [prev in thread] [next in thread]
List: nt-mgrs
Subject: RE: [nt-mgrs] Utilities for Disk Usage Reports
From: wkearney () gilman ! edu
Date: 2000-04-05 18:26:10
[Download RAW message or body]
The resource kit includes a diruse program. We have it dump it's results
into a text file. That file is then e-mailed to an exchange distribution
list.
The script:
-------------------------------------------------------
@ECHO OFF
REM
REM It increments the last diruse.log and leaves a new
REM file named diruse.log
REM
REM it assumes the directory d:\admin\logs will be shared as log$
(read/only)
REM
set RunDrive=d:
set AtPath=d:\ADMIN\WinAT
set LogPath=d:\ADMIN\Logs
set BinPath=d:\ADMIN\bin
set ResKitPath=d:\ntreskit
set DirToLog=d:\home\users
%RunDrive%
cd %LogPath%\
:start
if exist %LogPath%\diruse15.log del %LogPath%\diruse15.log
set x=14
:loop
REM look for file named "diruseX.log" and decrement
set /a y=x+1
rem echo x:%x% y:%y%
if exist %LogPath%\diruse%x%.log rename %LogPath%\diruse%x%.log
diruse%y%.log
if %x%==1 goto loopexit
set /a x=x-1
goto loop
:loopexit
if exist %LogPath%\diruse.log rename %LogPath%\diruse.log diruse1.log
copy nul: diruse.log
echo Started diruse at > diruse.time.txt
now >> diruse.time.txt
echo "Running NT diruse"
now
%ResKitPath%\diruse /K /* %DirToLog% > %LogPath%\diruse.log
echo Ended
now >> diruse.time.txt
type diruse.time.txt >> diruse.log
del %logPath%\diruse.time.txt
REM wrap these lines into one continuous line.
REM remove the ^ character
REM
%BinPath%\postie -host:gilfs1.gilman.edu ^
-to:backupXXXX@gilman.edu -from:diruse ^
-replyto:administrator@gilman.edu ^
-s:"diruse on %COMPUTERNAME%" -low ^
-msg:"diruse on %COMPUTERNAME% ^
file:///\\\%COMPUTERNAME%\\log$\\diruse.log" ^
>> %LogPath%\diruse.log
-------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic