N
Nathan H
Hi all
I'm trying to create a batch script on Windows Server 2003 (commands should
be relevent to 2000 also) that:
- cleans up any temp files
- analyzes a partition and records the info to a log file
- checks the created log file to see whether defrag needs to take place
The 3rd point is the problem I have.
I've managed to output defrag's analyze report but I'm having trouble
finding
a command that allows me to check that log file for the word "should" and
then
base an outcome if it finds it i.e.
output.log -----> "Should" ---> Yes ----> Run defrag
----> No -----> Finish
Hope that makes sense.
Any one have any ideas?
I've tried using FINDSTR but all I can get is it repeating the line
"should" was in and I cant think how to include it in a If & GOTO
routine.
Many Thanks,
I'm trying to create a batch script on Windows Server 2003 (commands should
be relevent to 2000 also) that:
- cleans up any temp files
- analyzes a partition and records the info to a log file
- checks the created log file to see whether defrag needs to take place
The 3rd point is the problem I have.
I've managed to output defrag's analyze report but I'm having trouble
finding
a command that allows me to check that log file for the word "should" and
then
base an outcome if it finds it i.e.
output.log -----> "Should" ---> Yes ----> Run defrag
----> No -----> Finish
Hope that makes sense.
Any one have any ideas?
I've tried using FINDSTR but all I can get is it repeating the line
"should" was in and I cant think how to include it in a If & GOTO
routine.
Many Thanks,