Defrag Batch File

D

Devon

When I try to use a batch file to defrag my disks, it
opens a command prompt and just starts scrolling "defrag
c:" then "defrag e:".
My batch file looks this:

----start file----
defrag c:
defrag e:
---- end file ----

It used to defrag properly when I did it like this but
now it doesn't. Am I doing something wrong?

I want to be able to run the batch like this so that I
can have it automatically defrag as the windows utility
doesn't let you set it to defrag more than one disk at a
time and I don't want to have to be there to tell it to
start defragmenting the next drive when it's done the
first.

Thanks
 
R

Ramesh [MVP]

Works fine for me. Try running "Defrag C:" command manuall and see if you
receive any errors. Try under administrator login.

--
Ramesh - Microsoft MVP
http://www.mvps.org/sramesh2k

Microsoft Most Valuable Professional Program
http://mvp.support.microsoft.com

~ Please reply to newsgroup ~


When I try to use a batch file to defrag my disks, it
opens a command prompt and just starts scrolling "defrag
c:" then "defrag e:".
My batch file looks this:

----start file----
defrag c:
defrag e:
---- end file ----

It used to defrag properly when I did it like this but
now it doesn't. Am I doing something wrong?

I want to be able to run the batch like this so that I
can have it automatically defrag as the windows utility
doesn't let you set it to defrag more than one disk at a
time and I don't want to have to be there to tell it to
start defragmenting the next drive when it's done the
first.

Thanks
 
I

Ian Smythe

Devon said:
When I try to use a batch file to defrag my disks, it
opens a command prompt and just starts scrolling "defrag
c:" then "defrag e:".
My batch file looks this:

----start file----
defrag c:
defrag e:
---- end file ----

It used to defrag properly when I did it like this but
now it doesn't. Am I doing something wrong?

I want to be able to run the batch like this so that I
can have it automatically defrag as the windows utility
doesn't let you set it to defrag more than one disk at a
time and I don't want to have to be there to tell it to
start defragmenting the next drive when it's done the
first.

Thanks

3rd party software does this automatically! Again programs
supplied with XP often lack full operations. I have three
hard drives and Diskeeper goes through them all while I am
doing something else. A click button operation. :)
 

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

Similar Threads

Defrag/shutdown batch file 4
can't defrag C: again 2
disk defrag 1
Defrag won't run 5
How can I automate system defrag? 1
Defragmenting with low priority 2
Defrag. not running 3
Scheduling Defrag in a batch file 1

Top