Defrag

H

hooverd

I have a command line that I am using to run Defrag from the Command window
on Win2K systems, however I need the results to create a text file on their C:
here is the command I am using.

@ECHO OFF
START "Defragmenting Hard Drive Before Shutting Down" /WAIT defrag.exe c: -f -
v

Any ideas how to make the text file happen?
 
J

Jerold Schulman

I have a command line that I am using to run Defrag from the Command window
on Win2K systems, however I need the results to create a text file on their C:
here is the command I am using.

@ECHO OFF
START "Defragmenting Hard Drive Before Shutting Down" /WAIT defrag.exe c: -f -
v

Any ideas how to make the text file happen?

@echo On
if exist c:\defrag.log del /q /f C:\defrag.log
call :logit>>C:\defrag.log 2>>&1
goto :EOF
:logit
defrag.exe C: -f -v

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top