Scheduling Defragmentation

  • Thread starter Thread starter Neil
  • Start date Start date
N

Neil

I want to schedule my computer to defragment
automatically. I am aware I need to use the defrag
utility. When in the command prompt I type "defrag <C:> [-
f]" and it says "Access is denied" if I set as a sheduled
task "C:\windows\system32\defrag.exe <C:> [-f]" then when
the task runs a command prompt window flashes open and
closed. By running it over several times I found it was
saying something about an invalid volume label. My hard
drive is drive C: I am running windows XP home. I am
using the owner account, it is the only account set up
and it is set as an administrator. I do have a password
set and it is entered into the sheduled task.
 
I would like to confirm the syntax for the command:-
defrag c: /f
That is the correct syntax to use. Cheers
 
I have also done this. I have a 120 GB HD. I have it partioned into two drives. When I select the defrag ("C:\windows\system32\defrag.exe") all that happens is the defrag window opens up. It doesn't start to defrag. I have to manuely. This defeets the purpose of setting a task correct? Any suggestions would be great

J Bell
 
You have to provide a drive letter along with defrag.exe

What you should be scheduling is below:

defrag.exe C:

- Greg/Raxco Software
Microsoft MVP - Windows File System

Disclaimer: I work for Raxco Software, the maker of PerfectDisk - a
commercial defrag utility, as a systems engineer in the support department.

Want to email me? Delete ntloader.

unionjackbell said:
I have also done this. I have a 120 GB HD. I have it partioned into two
drives. When I select the defrag ("C:\windows\system32\defrag.exe") all that
happens is the defrag window opens up. It doesn't start to defrag. I have to
manuely. This defeets the purpose of setting a task correct? Any suggestions
would be great.
 
Back
Top