XPost: alt.comp.os.windows-11, alt.comp.microsoft.windows
Marion <
marion@facts.com> wrote:
Storage Sense can be invoked with:
Win+I > System > Storage > Storage Sense = on/off
Then tap "Configure Storage Sense or run it now"
I searched the net for a way to invoke it with the Runbox.
Win+R > storagesense.msc (or something like that)
But I couldn't find the command to put into the Runbox.
<https://support.microsoft.com/en-us/windows/manage-drive-space-with-storage-sense-654f6ada-7bfc-45e5-966b-e24aded96ad5>
<https://support.microsoft.com/en-us/office/use-storage-sense-to-manage-disk-space-d77af168-e28f-4071-88a6-af08a3341688>
<https://community.automox.com/find-share-worklets-12/enable-and-configure-storage-sense-windows-10-1585#:~:text=TLDR%3A%20Enable%20Storage%20Sense%2C%20and,to%20reduce%20disk%20space%20usage.>
Do you know what runbox command runs Windows Storage Sense?
Not sure why you want to display the wizard for Storage Sense instead of
*run* Disk Cleanup (cleanmgr.exe). The latter lets you select more than
just temporary and download files to delete. Plus, you can use
cleanmgr's sageset argument to set what you want to delete, and then
later use its sagerun argument to delete that set of files (instead of
the default set).
cleanmgr.exe /sageset:N
Select what file sets you want to delete.
cleanmgr.exe /sagerun:N
Do a cleanup using the file set you saved under index N.
N is a number of the saved file set you want to save, and then later
run. So you could use sageset to create different file sets, and then
later decide which file set to delete using sagerun.
If you don't want to define a file setup using sageset, and you don't
want to bother seeing the GUI for cleanmgr, but just want it to clean
using its defaults, use the /autoclean argument. However, all that
cleans are files left behind after a Windows upgrade.
cleanmgr does more than Storage Sense. You want to do an on-demand
clean, so use cleanmgr. All Storage Sense does is to schedule how often
to run a cleanup. Well, you can do that in Task Scheduler with
cleanmgr.
Storage Sense has the option to specify how old are the files to delete
in the Recycle Bin, and how old are files in the Downloads folder.
cleanmgr does not have those options, but you can use robocopy.exe with
its maxage argument. However, robocopy cannot delete, just move/copy.
So, in your batch script, you create a temporary folder, have robocopy
move files to there over some number of days old, and then delete the
temporary folder.
The default retry count and wait counts are way too high. Be sure to
lower them to something reasonable, like /r:10 (10 retries, not a
million), and /w:10 (for 10 seconds per retry instead of 30 seconds).
The only advantage of Storage Sense is it monitors for low disk space
for when to do a cleanup, and can delete files from the Recycle Bin that
are over max days old. However, if you schedule cleanmgr to run each
day, like while you are sleeping and the computer is idle, you won't
have any build up in Recycle Bin, and the scheduled cleanup gives you
back storage space rather than cause problems with low storage space
hoping Storage Sense eventually frees up some. If you don't want to use
a saved file set via sageset to do a clean, but just want a cleanup when storage space gets low, use cleanmgr's /lowdisk argument.
With cleanmgr's sageset and sagerun arguments, and Task Scheduler with
cleanmgr and robocopy, Storage Sense is superfluous.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)