Windows

Video: Add Defragment and Disk Cleanup to Windows right-click menu

Bill Detwiler shows you how to add the Defragment and Disk Cleanup commands to the Windows right-click menu.

Windows power users often run the operating system's Defragment and Disk Cleanup utilities as part of their regular system maintenance. And while you can access these tools through various Windows menus and applets, those who use them frequently might want a quicker option. During this week's episode of TR Dojo, I show you how to add the Defragment and Disk Cleanup commands to the Windows context menu--putting them just a right-click away.

For those who prefer text to video, you can click the Transcript link that appears below the video player window or check out Jack Wallen's article, "How do I add Defragment and Disk Cleanup to the right-click menu in Windows Explorer?"

You can also sign up to receive the latest TR Dojo lessons through one or more of the following methods:

About

Bill Detwiler is Managing Editor of TechRepublic and Tech Pro Research and the host of Cracking Open, CNET and TechRepublic's popular online show. Prior to joining TechRepublic in 2000, Bill was an IT manager, database administrator, and desktop supp...

15 comments
vuralun
vuralun

Defragment runs at DOS screen and perform an analyze ,with results only. Defragment function does not run. No command line to run defragment utility seen on screen. Using Windows xp professional as OS. What could be the reason..

MikeBlane
MikeBlane

When you created the DiskCleanup key, you used "diskcleanup". Why didn't you choose "defrag" or "defragment" for the registry key name for the defrag utility?

Who Am I Really
Who Am I Really

Defrag: Yes Disk Cleanup: [b]NO! NO! NO! NO![/b] a daily fragmentation analyze just before shutdown, and a 5 or so minute defrag when necessary which depending on what I was doing is usually also daily generally a daily defrag won't take hours upon hours but an annual defrag will take hours upon hours _ There is a major problem with disk cleanup; - by default, it creates a permanent setting in a registry key to the tune of: "Compress older unused files" which has a specific time frame for what it considers old unused files and even if you never run disk cleanup again it goes about your disk every day compressing files you haven't opened for a while [b]which is bad news for your media files[/b] I had months of work destroyed by this junkware it roasted several .wav and .mp3 files by compressing them so I never allow it to run, - when I get a low disk space pop up, - nor do I invoke it manually

bjr1214
bjr1214

REPOST UNDER TR DOJO VIDEO First of all you will need to assign the desired drive letter in the registry. So you would have to create multiple keys to scan multiple drives. for example create a key "Defragment C", create a key "Defragment D" and so on. However if you only want to defragment a single drive, you may find this useful. If you would like to run your own defrag utility rather than the useless (IMO) windows supplied utility, the same can be achieved if the utility has a command line feature. In this example I used "Defraggler" Follow the steps above however rather than entering the "defrag %1 -v" value, point it to the defraggler command line tool. This is found by default in the "C:\Program Files\Defraggler" folder. I used "C:\Program Files\Defraggler\df.exe c: /Large *.* 300" this defrags the C Drive and moves large files 300Mb or over to the end of the drive, therefore speeding up operations. You could also simply use "C:\Program Files\Defraggler\df.exe c:" I hope this helps someone

ekwiecie
ekwiecie

Wondefull the tips. I made it and it really works. Thanks Bill

ronbat1
ronbat1

i think that was a good topic...helpful

robe861
robe861

Why does XP run soooo sloooowly on occassions. I run disk-cleanup almost daily.

Bill Detwiler
Bill Detwiler

Windows power users often run the operating system's Defragment and Disk Cleanup utilities as part of their regular system maintenance. In this TR Dojo episode, I show you how to add the Defragment and Disk Cleanup commands to the Windows right-click menu. How often do you defragment or perform hard disk maintenance tasks--weekly, monthly, never? Take the poll in the above post and let me know. Original post and poll: http://blogs.techrepublic.com.com/itdojo/?p=2053

jardinier
jardinier

I have one computer running XP with 128 MB RAM. This is the minimum recommended for XP. It booted up and ran at a satisfactory speed. I was using this computer primarily for writing documents. But of course I had to experiment and connected to the internet. So I had to install AV and anti spyware. The thing now takes 10 minutes to boot up, automatically increases virtual memory and takes ages to do anything. I assume it is the AV sitting in memory that slows the thing down so dramatically. I have another computer with P III 1 GHz and 320 MB RAM. It is also horrendously slow because I have so much software installed -- I am a software junkie -- and a lot of this loads into memory at start up. BTW I defrag very rarely and have never noticed an increase in speed after doing so. A drive has to be seriously fragmented to slow the computer down to a noticeable degree. In the poll connected with this discussion I opted for monthly, as there was not a option for, say, three months or six months which is closer to what I do.. Monthly was the most popular in the poll. There is another program defraggler which I think is more thorough than Windows defrag. You can read about it and download it here: http://www.piriform.com/defraggler

widd11e
widd11e

A software you are running in the background. I had the same problem with one of my security software and my browser, and email client. After fixing the problem it cleared up. Check your CPU usage, and memory performance to see if this is the problem. I run XP also.

b.g.domin
b.g.domin

I don't have the Drive folder in the registry. Is this for Windows 7? Do I just create those folders/keys? I recently upgraded to W7 64 last week.

Bill Detwiler
Bill Detwiler

The tip should work in Windows 7. In fact, all the screenshots used in the video were taken on a machine running Windows 7 (albeit 32-bit). I have not test this on Windows 7 64-bit, but I see no reason why it wouldn't work. You will need to create a few new registry entries, but the key: HKEY_CLASSES_ROOT\Drive\shell should exist on your machine.

salam
salam

I follozed the steps, I have the defragment menu when I right click any drive, however, chosing it displays a dos windows that shut downs right away. It seems to me that it is erroring, any idea Bill Thankas in advcne

anthonyis2000
anthonyis2000

I just added it to my Win7 64 bit system and it works corretly for defrag and cleanup.