Everybody is aware of using Disk Defragmenter that comes out of the box with a Microsoft OS to defragment broken files across a given drive. Depending on how large or how bad this disk is, it could take hours to defragment a given drive.
There are multiple situations where you might want to defrag just a folder or a network share, assuming u have admin permissions to do that (No this can’t be used as a prank to mess with your neighbor).
In my case, I was running a BitTorrent on my machine for a while and observed that most of my fragments are under a single folder. I did not want to defrag the whole drive just for this, so I used to wait until I just moved/deleted the contents under that folder.
Recently I came across something simple, yet unpublicized utility from Microsoft which does exactly this. I wonder why people install or pay for some third party software vendor that does this.
Here is how you do this for yourself
Steps:
1. Download contig.exe from http://technet.microsoft.com/en-us/sysinternals/bb897428
2. Create a Defrag.BAT file with the following contents:
DEL Defrag.log
echo Start Time: %time% >> Defrag.log
defrag.exe E:\folder -V >> Defrag.log
echo End Time: %time% >> Defrag.log
Note: in the above BAT file, E:\folder is the folder to be defragged.
About Me
- Madhan Arcot
- If life is all about change, motion and flow, I would be the one cruising past you on a SunDancer.
Sunday, January 22, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment