Not all users, of course, but very many, if they don’t encounter the Temp folder in their daily work, at least they have heard and know that it exists on Windows systems. Why do we need a Temp folder, what is it, what functions does it perform, and whether it is possible to delete it, will now be considered. Take Windows 7 as an example, although there is no fundamental difference in which system to take as a basis.
Temp folder: what is it and why is it needed?
So, the purpose of this directory can be understood under the condition of the usual interpretation of the abbreviation Temp from the word temporary. The basic interpretation, in simple terms, means "a directory for storing temporary files."
If anyone does not know, in the course of their work, the operating system itself or the programs installed in it for their own needs create precisely the temporary files necessary for the correct installation or operation. Files of the Temp folder, as a rule, have the extension .tmp, some of them are deleted automatically, for example, at the end of some process, some remain in the system, and if the process associated with them is in an active stage, say it works in the background, then getting rid of such files simply will not work. So it turns out that the contents of this directory, in fact, is the most common computer garbage that you can and should get rid of, but do it without harm to the system.
Where is the Temp folder on Windows?
Now a few words about where exactly you can find the directory of temporary files. The fact is that the Temp folder in Windows is not the only one. Many will be surprised, they say, why in the system to have several folders. Here it is worth paying attention to the use of multi-user mode. The directory in which temporary files are saved is created for each specific user, not counting the main directory in the system itself.
Thus, as a rule, the Temp folder in Windows 7 can be located either in the root of the system partition (in most cases it is the “C” drive), or in the system directory (Windows), or in the Local directory located in the AppData folder of the user section (Users \"Username"). In Windows XP, the Local folder is called Local Settings.
In principle, in order not to rummage around in the same “Explorer” for a long time, you can use the built-in search system, in which the% Temp% string is set as a criterion. This is done in order to find all available directories that may be hidden. If the search is carried out in manual mode, you should enable the display of hidden objects in the "View" menu of the standard "Explorer" or any other file manager. By the way, some temporary files may also have this attribute.
How to clean the Temp folder with the simplest method?
If we talk about whether it is possible to delete the Temp folder from any location, we will make a reservation right away: it is by no means recommended to do this. Another thing is to clean up its contents. There are several ways to do this.
In the simplest version, you should enter it into it, select all files, and then delete it. How to make a selection, everyone decides for himself. But, as you know, it is best to use the combination Ctrl + A, rather than marking with the cursor, and even more so by executing the corresponding commands from different main or additional menus.
But there may be a small problem. The fact is that some files may be involved in some process, and just deleting them will not work. First, you need to complete the active services that use them, but the easiest way is not to determine which process blocks the files, just restart the computer and try to delete it again. But this method does not always work.
Disk Cleaner
One of the most effective methods can be called cleaning the disk. It is the “native” OS tool that allows you to delete temporary files without harming the system or the currently running programs, applications and services.
To do this, use the disk properties menu, where you need to click on the cleanup button and select the items to be deleted. Can I delete the Temp folder this way? Not. As such, the directory remains on the disk, but its contents are completely and completely cleared.
Cleaning through the command line
You can use the command line to clean the directory of temporary files , but to enter long commands for each section seems impractical.
The easiest way is to create an executable file with the extension .bat (for this you can use the usual Notepad and write the following commands in it:
DEL / F / S / Q / A "C: \ Windows \ Temp \ *"
DEL / F / S / Q / A "C: \ Temp \ *"
DEL / F / S / Q / A "C: \ Users \ Name \ AppData \ Local \ Temp \ *"
Name - username. This method of launching the BAT file allows you to clear all the folders that are present in the system, without much effort. As practice shows, it is best to save such a file directly on the desktop, so that you always have it at hand and, in which case, perform this operation within just a couple of minutes.
Using third-party utilities
Now a few more words about how the Temp folder is cleared. What it is, probably already a little clear. Let's see how to get rid of its contents with the help of special programs, usually called optimizers.
In any such package there is a special module for searching and deleting temporary files, and it does not matter where they are located. And, as a rule, it is involved in cleaning and optimizing the system by default, although if you have the necessary knowledge, you can make your own customization. Let us illustrate with the example of the simplest CCleaner utility.

Here in the cleaning section you need to pay attention to the tabs located on the right side (Windows and Applications). In principle, for deep cleaning, you can select all items, including not only temporary files, but also memory dumps, clipboard, message history of the system, etc. In fact, all this information can also be attributed to temporary objects, or, more simply, to ordinary computer trash. The rest is simple. We activate the analysis process, and after issuing the results, confirm the deletion of the files using the corresponding button. As you can see, nothing complicated. By the way, it is the use of such programs that allows the most complete and safe cleaning.
Conclusion
Here, in fact, briefly and everything on the topic "Temp-folder: what is it and how to clean it." Naturally, in this case, we did not consider means of optimizing the directories of this type themselves using the settings of environment variables. But, it seems, to the average user this is by and large not necessary.
As for the removal of these directories, as is already clear, this is not worth doing, although some users delete them without a twinge of conscience. But here, as they say, there is a double-edged sword: for some, the system will automatically create a directory when it is reloaded, while for others it will crash. So it is better not to take risks, but to use either standard or third-party cleaning agents. So it will be much safer.