(off topic) (Win7) How to invoke "Disk Cleanup" from the command line?

Started by snowsnowsnow, April 04, 2024, 08:37:41 PM

Previous topic - Next topic

snowsnowsnow

(I'm back - been off WB for a long time now - but still dabble in it)

This is OT, but I've often asked general Windows questions here in the past and gotten good answers (better than I get from any of the usual online help places).\

Anyway, I'm running Win 7 (this can't be changed) and running out of disk space from time to time (this also cannot be changed).  By accident, I found the "Disk Cleanup" function by searching in the Start Menu.  It works fine, but it is somewhat inconvenient to do it this way (popping up the Start Menu, typing in "Disk Cleanup" in the Search window, hitting enter a couple times, etc).

There is usually a "rundll" or similar trick to running these things directly from the command line or from a script.  Does anyone know of such a trick for Disk Cleanup?  Thanks.


td

There is "cleanmgr" which executes from a cmd prompt. Not sure but I believe it is available on Windows 7.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

td

"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

spl

Quote from: td on April 04, 2024, 10:08:25 PMThere is "cleanmgr" which executes from a cmd prompt. Not sure but I believe it is available on Windows 7.

and if it is, running C:\windows\system32\cleanmgr.exe /? from cmd will show available options. And, to echo Tony... welcome back
Stan - formerly stanl [ex-Pundit]

snowsnowsnow

Thank you all.

In fact, "cleanmgr" works fine from the command line (in W7).  Thanks for the tip.

(I haven't tried the /? option yet, but that sounds like it could also be useful)

spl

Stan - formerly stanl [ex-Pundit]

snowsnowsnow

QuoteMicrosoft has some details about the cleanup options here:

Yeah, I'll have to take a look at that.  I tried the /? and got a nice, well-formatted help message that was entirely gibberish.