Hello! As we open applications and files, a set of elements are created. Indeed, these items are called temporary files. Specifically, they are elements linked to the object to facilitate access at the next access. Consequently, the data will be loaded in a more efficient way. However, as time goes by, these files accumulate in the system. As a result, they can cause problems. So today we will show you how to clean up temporary files with CMD.
How to delete temporary files in Windows 10 using CMD.
Cleaning Windows is a very necessary task. Therefore, we have already shown you how to do it graphically. However, if you are fond of the command line, or have problems with the desktop, then you can try this solution. The first thing you have to do is to open a command prompt with administrator privileges. With this intention, press the Win+Q combination to open the search button. Please type CMD and select the option with administrator privileges.
The first thing you have to do is to go to the specific folder where you will delete the files. With this in mind, run the following commands:
Now we are going to delete the temporary files using the command:
del *.tmp /s /f /q
Let us explain briefly what each command does:
- /s: it deletes specific files from the current directory and all subdirectories. Additionally, it displays the names of the files as they are deleted.
- /f: this is a parameter that forces the deletion of read-only files.
- /q: this is the silent mode, i.e. it does not ask for confirmation of the deletion.
Some additional parameters to be used:
- /p: Requests confirmation before deleting the file specified in the console.
- /?: displays the command prompt help for the command
Now, let’s see the command in action.
After a while, CMD will have finished the work.
Finally, complete the cleaning with the steps described in this tutorial. Okay, in the end, we have seen how to clean up the temporary files with CMD. This is a good way to keep the system running. Bye!