Computing.Net > Forums > Programming > Diruse batch script help

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.

Diruse batch script help

Reply to Message Icon

Name: Allen (by dryroasted_99)
Date: July 29, 2008 at 08:18:32 Pacific
OS: Win XP
CPU/Ram: 512
Product: Dell
Comment:

I have folder that has a something call Audit.DAT when its size reaches to 2G. It stops the application and start given errors. So, I have to make new Audit.dat and rename the old Audit.old. I can never tell when it will reach to 2G so i have to check the size every other week . I thought Diruse would work but it didn't work it only works checks DIR/Sub Dir. Any Advice or suggestion or script that will help! I would like to get an email alert before it gets to 2G. Here is what i have worked on.

\\nt3698\e$\med\MED\Audit.DAT /m /d /o /Q:2000 /, > drvdata.txt
echo %ERRORLEVEL%

IF %ERRORLEVEL% EQU 1 GOTO EX
GOTO OK
:EX
@ECHO Limit exceed
blat drvdata.txt -to Allen.D@test.com -s "Alert AUDIT.DAT Limit has exceed 1.8 GB"
GOTO END
:OK
@ECHO Limit within
blat drvdata.txt -to Allen.D@test.com -s "Audit size within Limit "

:END



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: July 29, 2008 at 18:42:51 Pacific
Reply:

This is going to be a long line (and untested)...

SETLOCAL ENABLEEXTENSIONS
FOR %%a IN (\\nt3698\e$\med\MED\Audit.DAT) DO IF %%~Za GEQ 1932735283 (SET str=Alert AUDIT.DAT Limit has exceed 1.8 GB) ELSE SET str=Audit size within Limit - %%~Za

BLAT - -t Allen.D@test.com -s "%str%" -body "%str%"



0

Response Number 2
Name: Allen (by dryroasted_99)
Date: July 30, 2008 at 08:41:34 Pacific
Reply:

Razor2.3, I tried what you have posted but i keep getting weird errors. Here is one i remember "Invalid parameter to SETLOCAL command".
Thanks!


0

Response Number 3
Name: Mechanix2Go
Date: July 30, 2008 at 13:59:31 Pacific
Reply:

I give up; what are these:

diruse
blat


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

M2


0

Response Number 4
Name: Allen (by dryroasted_99)
Date: July 30, 2008 at 14:41:51 Pacific
Reply:

Razor2.3, I fixed it. Thank you so much for your help!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


quick perl question Razor...I figured out my ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Diruse batch script help

Batch Script Help Needed www.computing.net/answers/programming/batch-script-help-needed/14475.html

Simple Batch Script help www.computing.net/answers/programming/simple-batch-script-help/12744.html

Batch Script Help and Suggestions www.computing.net/answers/programming/batch-script-help-and-suggestions/14552.html