Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduled Defrag on Win 2000 Server 1

Status
Not open for further replies.

SteveAudus

Technical User
Oct 4, 2001
409
GB
Is it possible to schedule a defrag of server drives.

Is there a command line for running defrag,
if so I can right and schedule a bat file.

I understand defrag runs through mmc.
c:\winnt\system32\dfrg.msc

I have looked at Diskeeper, which has scheduler built in,
but you have to pay for that.

Is it possible any other way?

Any suggestions?

Thanks

Steve Audus

 
im not sure its possible !
i saw some programs like "defrag commander" that should do what you are looking for.
 
I think it would be possible to create a batch file that will do the backup for you.

I created a batch file with this line in it
defrag c:\ -f

I'm not sure if its working properly yet since its still running, because you can only start one instance of defrag. So will have to let it run and see if the fragmentation level will change.

/Kim
 
I'm currently on a WinXP machine but will try on one of our Win2k Server. You are right seems win2k server doesn't have a defrag.exe like windows xp.

I will have a look and see what you can do on win2k server.

Sorry I never checked if it worked on win2k I just assumed that it would....

/Kim
 
Did some diggin on the net and it seems there is a way to do it using visual basic script.

Have a look on this page for some more information. I have not tried this myself and know virtually nothing about VB scripts.

One other solution might be to copy the defrag.exe from a windows xp box but haven't tried that either. Actually thinking about that you can probably schedule the defrag.exe to run directly from the scheduler instead of putting it in a batch file...

/Kim
 
Kim,

thanks for the tip, I've got the script and going to give it a try.

I tried copying defrag.exe onto the Server,
but it failed to run, some Kernal error.

Thanks very much for your help.

Steve

 
Yeah I also tried copying the file from winxp.

Hope the script works ok for you.

Why does MS have to make life so much harder than it has to be? I mean obviously they changed it in WinXP so it again has an exe file that you can run, you could also do it in NT4 so why only make it accessible thru mmc in win2k is beyond me.

Happy defraggin :)

/Kim
 
No problem

I also found that page but not sure when I had it in my bookmarks list, but never played with the program.

Glad you got your defrag problems sorted mate!

Kim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top