Link to home
Create AccountLog in
Avatar of rsnellman
rsnellmanFlag for United States of America

asked on

How can I create a activity log of the command-line defrag.exe?

Hi, I guess I closed my last thread too soon.  I have setup defrag.exe to auto run via Scheduled Tasks, but I cannot find a log that tells me how much it was fragmented or how long it took to defrag, etc.  Is there a switch or parameter I can use on defrag.exe to make it dump a log of the activities of the auto defrag?

Thanks in advance.
SOLUTION
Avatar of nordtorp
nordtorp
Flag of Norway image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of rsnellman

ASKER

Tried the .cmd code you suggested and it created a log file, but the log only has this in it:

Windows Disk Defragmenter
Copyright (c) 2003 Microsoft Corp. and Executive Software International, Inc.
Usage:
defrag.exe <volume> [-a] [-f] [-v] [-?]
  volume  drive letter or mount point (d: or d:\vol\mountpoint)
  -a      Analyze only
  -f      Force defragmentation even if free space is low
  -v      Verbose output
  -?      Display this help text

What went wrong?
ASKER CERTIFIED SOLUTION
Avatar of Michael Warren
Michael Warren
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Merlinsmaster,
That did the trick.

Thanks to all.