Today’s guide is designed to help you when you receive a dos command for a disk cleanup error code.
g.Click Start, then click Run.In the Open box, type the following sequence, and then press ENTER: c: windows SYSTEM32 cleanmgr.exe / dDrive. Note. This command is currently using the drive letter as a placeholder “Drive” and will be cleaned up automatically.
- 5 minutes to read.
This article describes how to use the Disk Cleanup Tool (cleanmgr.exe) with command line parameters. cleanmgr.exe is designed to help you remove unnecessary files from all over your computer’s hard drive. You can switch to cleanmgr.exe from the command line to clean up the files you want. You can then use the Scheduled Task tool to schedule the task to run at a specific time in the past.
Applies to: Windows Server 2008 R2 SP1, Windows 7 SP1
Original number in the knowledge base: 253597
Command Line Switch
You should definitely run the disk cleanup method by running cleanmgr.or exe by running the appropriate program Start> Programs> Accessories> System Tools> Disk Cleanup. Disk Cleanup supports the following command line parameters:
/ d: This switch determines which drive to clean up with Disk Cleanup. Switch
/ djust isn’t used with
/ sagerun: n.
/ sageset: n– This switch displays the Disc Cleanup Options discussion box and creates a Registry Manager to save your settings. The stored n value is only in the registry and allows you to set various tasks to perform disk cleanup. The value n is most likely an integer between 7 and 65535 of the
/ sagesetswitch, you may need to specify the drive letter where the Windows installation is located.
For more information, see Registry Key Information .
/ sagerun: n– This panel performs specific tasks that can be assigned to n using the
/ sagesetswitch. Sticks in computers will be enabled and the selected profile will be executed for each drive.
For example, for the most recently scheduled tasks, you can run the following command after all
cleanmgr commands have been executed:.
cleanmgr / sageset: 11/ sagerun: 11
This Disk command performs a cleanup using the parameters specified in theNande
cleanmgr / sageset: 11.
Available disk cleanup options that experts say can be specified using the
/ sageset and
/ sagerun switches include:
- Configuring temporary files: these files are no longer needed. They were originally developed by an installer that no longer works.
- Downloaded Program Files are ActiveX and Java control tutorials that are automatically downloaded from the respective Internet when you browse certain web pages. They are temporarily stored in the downloaded program files folder on your hard drive. This option includes a “View Files” button that allows you to view the files that will be deleted.
- Temporary Internet Files: The Temporary Internet Files folder contains websites that are stored on your hard drive for quick viewing. Your personalized terms for websites remain unchanged on the left. This option includes a Show Files button indicating the data to be deleted.
- Old Chkdsk files – if Chkdsk checks your hard diFor errors, portions of the memory list may be lost as files in the root folder of your current hard drive. These files are unnecessary and can be deleted. Cart
- recycle bin – the recycle bin contains files that someone has deleted from your computer. These presentations are not permanently deleted until you empty the trash. This option should have a Show Files button that launches the trash can.
- Temporary files. Sometimes programs store temporary information in a very temporary folder. It usually erases this information before the program ends. You can safely delete temporary files that have not changed for over a week.
- Temporary Offline Files: Temporary known files are local copies of recently used network files that are very easy to cache. You will probably use them when you disconnect from this network. There is a “View Files” button that opens most of the offline file folders.
- Offline files: local temporary files include copies of network files that the user has specifically made available offline . You can use them when you are disconnected, including from the network. The View Files button opens the Offline Files folder.
- Compress old files: Windows can compress files that you haven’t used for a long time. Compressing versions saves disk space, although you can use them. No facts are deleted. Since files are compressed at different rates, this is the approximate total display space you will save. You can use the button options to specify the appropriate number of days to wait before compressing the consumed coffee file.
- Catalog files for human content indexer: Indexing speeds up maintenance and improves file searches by maintaining an index of files on disk. These programs are the result of reindexing and can be safely removed.
If you select a drive that may contain a Windows installation, all options related to these options will be available on this Disk Cleanup tab. If you select a different drive, the Disk Cleanup tab will display the following for the index options Only the trash bin and directory files are accessible.
Output Options Other options include clearing backups of Windows components or installed programs. You will most likely use the Windows Components option to free up space by removing optional Windows components that you are not installing. When you click the Clean button required for this setting, the Windows Components Wizard starts. You can use installed programs to free up more disk space by uninstalling programs that their owners are not using. Selecting this button for cleanup will launch the Change or Remove Programs function in the Add / Remove Programs tool.
After running the cleanmgr.exe key with the
/ sageset: n switch, some registry subkeys added to the key remain modified in the following specific registry key:
HKEY_LOCAL_MACHINE SOFTWARE Microsoft Windows CurrentVersion Explorer VolumeCaches
Each of the modified registry sub statements can contain a portable or computer REG_DWORD StateF valuelagsNNNN, where NNNN is the number n specified in the control. For example, if you run the
cleanmgr / sageset: 9 command frequently, a registry service is added for Stateflags0009. The case severity can be defined as one of the following values.
- If no selection is selected, the value is assumed to be 00000000.
- If a radio button was selected, the value was always 0000002.
For Microsoft Windows XP versions of this article, see How to Automate Disk Cleanup in Windows XP .
Under the VolumeCaches subkey, the registry subkey that is suggested for offline paging files has the values Stateflags. It may be possible to delete individual files.
The software to fix your PC is just a click away - download it now.
Press the Windows key.Enter Disk Cleanup.In the search results, select the Disk Cleanup Desktop app.Select the required unit – clean it.Check all items.Click OK.Press the main Delete Files button to confirm and start the cleaning process.
Click Settings> Control Panel> Administrative Tools.Click Disk Cleanup.In the Drives list, select the drive on which you want to run Disk Cleanup.Select and the files you want to delete.Click OK.Click Delete Files.