File temp. Don't forget to clean the Temp folder

In the operating room Windows system there is a so-called Temp folder, which stores all the temporary information necessary for the operation of the computer. It is used by programs installed on the computer and the OS itself and is needed to save computing resources. Instead of storing intermediate values computing and data processing in random access memory, Windows places them in this directory. This article describes why the Temp folder is needed, where it is located, and how to delete the data in it.

Location

Some applications may create their own directories to store temporary information. However, the most commonly used Temp folder is located at "C:\\:Users\*username*\AppData\Local". Instead of drive C, there can be any other media on which the operating system is installed. Username refers to the login of the account under which you work in this moment.

The second most commonly used Temp folder is located in the “Windows” directory on the system hard drive.

Setting display options

It should be noted that the AppData directory in which Temp is located is hidden and cannot be seen without preset Windows Explorer. To do this you will need:

After this procedure, you will be able to see and open the AppData directory to get to the Temp storage and delete its contents.

Clearing temporary storage

Typically, the Temp folder is cleaned automatically by Windows OS tools. However, there are times when, as a result of failures or incorrect operation of some programs, the system cannot delete some files, and they remain. Over time, such “garbage” accumulates, and the size of the directory grows and can reach several tens of gigabytes. In this case, you must delete its contents.

No harm to Windows cleaning does not carry, so you can delete all files contained in the directory without any fear. To do this, simply go to this directory, select all its contents (using the mouse cursor and the Alt+A key combination) and press Detele.


I am often asked the same question - how to optimize the operation of the OS so that it works correctly and what is the temp folder and what does it serve?

This folder contains everything that accumulates in it over the entire period of operation of the operating system and for correct operation OS, it should be constantly cleaned.

Today, I want to analyze this issue in detail and thoroughly and teach all blog readers how to clear, and most importantly create, such a temporary file storage on their PC or laptop.


In our OS, in in this case This is Windows, hundreds, and sometimes thousands of internal processes occur each time. After such intensive work of the operating system and even applications third party manufacturers, V certain places Masses of temporary files accumulate.

All internal and external applications, use these files, but when the computer is turned off, sometimes they do not cope with the task of deletion and therefore, the user must independently clean his system of temporary files.

I can say quite seriously that cleaning the folder with temporary files is a must! For, temporary files negatively affect both the operation of the operating system itself and the operation of other applications and programs.

Cleaning out the “Temp” folder

As I said above, basically the temp folder is not produced by the system in automatic mode. Sometimes the OS cannot cope with this task due to certain conditions and therefore this action is transferred to the user’s shoulders. In addition, many third-party programs simply do not delete temporary files after installation. And, to be honest, we ourselves endanger the system and turn off the PC incorrectly, for example directly, that is, with a button. Well, is this situation familiar?

If we take the Windows 7 OS as a basis, then there are as many as five folders in it with the name “Temp”. But in the main case, only the first two folders are used, and these are the ones that need to be cleaned in mandatory and before everyone else.

You can clear these folders manual method, or you can make the temp folder clean itself and, moreover, automatically.

How to do automatic cleaning folders with temporary files, I will tell you at the end of this article.

The first folder is located at “C:WindowsTemp”.

The second folder is located at “C:UsersUsernameAppDataLocalTemp”.

Instead of the user name, you should substitute the name that was entered when installing the operating system. I have it “Admin” and the address to the folder will look like this

"C:UsersAdminAppDataLocalTemp." It may be different for you. Next, you should go to the folder at the above addresses and manually delete all the contents of this temporary storage. It happens that when deleting manually, some files give a deletion error and immediately refuse to leave their home. This should not scare you, this is not a virus, but simply this file takes part in the operation of some application and it is enough to launch the “Task Manager” using three magic keys“Ctrl + Alt + Delete”, open the processes tab, find the unfortunate line, it may look like this - “Process name.exe” and delete it from the list with the same “Delete” key.

The remaining folders with temporary files are located at the following addresses:

"C:UsersAll UsersTEMP";

"C:Users.All users TEMP";

and the last folder

"C:UsersDefaultAppDataLocalTemp."

You can clean all folders manually by going into each one, or you can also clean them using standard means Windows, called Disk Cleanup.

To do this, you should open the “Start” menu, go to the “All Programs” tab, then select the “Accessories” and “Service” tabs, then click the “Disk Cleanup” line. In the window you should select drive “C” and clean it. In this application, you can delete not only temporary system files, but also many other files, such as Internet browser files that may be hanging dead weight- for years, while slowing down the opening of pages by your browser.

Automatic cleaning of the Temp folder

In order for the temp folder to perform automatic self-cleaning, we need to make a few changes and for this create the so-called “ Batch file script." So that you can be sure that you will not lose your files and settings, I recommend creating a restore point in case something goes wrong.

After insurance, we do the following:

  1. Open the “Start” menu and find the “My Computer” shortcut;
  2. Click on the shortcut right click mouse and select the tab " Extra options" and further "Environment Variables";
  3. In the window that appears, replace “Temp” and “TMP” with next line"C:/Windows/Temp";
  4. We replace the variable and click the “Ok” button; we perform the same operation with the “TMP” variable.

But our work is not finished yet and it remains to add the final touches to the overall picture of our manipulations. Next, we should open any editor that works with text; you can open Notepad and copy the following text into it:

"pushd %TEMP% && rd /s /q . > nul 2>&1

pushd %WinDir%TEMP && rd /s /q . > nul 2>&1″

Attention - this code paste without quotes!
Next, we need to save this file in the root of the main drive “C” under any name, but be sure to include the “cmd” extension, otherwise all our work will not be active. In order not to accidentally delete this file, name it “Admin.cmd”, so you will remember that this file is important for the system.

The path to the file will look like this:
C:Admin.cmd".
And to complete all the actions, we need to go to the “Start” menu and select the “Run” tab. In the editor, enter the following line - “gpedit.msc” and press the “Enter” button on the keyboard. Next, in the window that opens, select the line “Computer Configuration”, then go to “ Windows Configuration" and go to the line "Start and Shutdown Scripts". Next, go to the settings properties and select “Shut down”. Next, click on the “Add” button and then we should specify the exact path to the configuration file, in our case, it is “CAdmin.cmd”.

All given commands and codes must be entered without “quotes”! The same manipulations should be carried out in the “User Configuration” tab.

I can congratulate you, the temp folder will now self-clean automatically every time you shut down work on your PC or laptop. That’s all for today and I say goodbye to you until the next publication, in which you will learn - What to do if it is impossible to delete a file from your computer? And in order to be the first to know about new publication on my blog, I recommend that you subscribe to blog updates using the form below. Subscribing will not take you even five minutes.


if(function_exists("the_ratings")) ( the_ratings(); ) ?>

Not all users, of course, but many, if not, encounter the Temp folder in daily work, then, by at least, have heard and know that it exists in Windows systems. Why this is needed, what functions it performs, and whether it can be removed will now be discussed. Let's take Windows 7 as an example, although in this case there is no fundamental difference in which system to take as the basis.

Temp folder: what is it and why is it needed?

So, you can understand the purpose of this directory using the usual interpretation of the abbreviation Temp from the word temporary. The main interpretation, if we speak in simple language, means "directory for storing temporary files".

If anyone doesn’t know, in the process of its operation the operating system itself or the programs installed into it for their own needs create exactly the temporary files necessary for correct installation or operation. The files in the Temp folder usually have the extension .tmp, some of them are deleted automatically, for example, upon completion of some process, some remain in the system, and if the process associated with them is in the active stage, let's say it is running in background, then it’s simply not possible to get rid of such files. So it turns out that the contents of this directory, in fact, are the most common computer garbage, which can and should be gotten rid of, but do this without harm to the system.

Where is the Temp folder in Windows?

Now a few words about where exactly you can find the temporary files directory. The fact is that the Temp folder in Windows is the only one is not. Many will be surprised, they say, why have several folders in the system. Here it is worth paying attention to the use of multiplayer mode. The directory in which the 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 system partition(in most cases this is drive “C”), either in the system directory (Windows) or in the Local directory located in the AppData folder of the user section (Users\"User name"). On Windows XP Local folder is called Local Settings.

In principle, in order not to rummage through the same “Explorer” for a long time, you can use the built-in search system, in which the string %Temp% is set as a criterion. This is done in order to find all existing directories that may be hidden. If the search is carried out in manual mode, you should enable display hidden objects in the “View” menu of standard “Explorer” or any other file manager. By the way, some temporary files may also have this attribute.

How to clean the Temp folder using the simplest method?

If we talk about whether it is possible to remove Temp folder from any location, let’s make a reservation right away: it is under no circumstances recommended to do this. Another thing is to clean up its contents. There are several ways to do this.

In the very simple version You should go into it, select all the files, and then delete. How to make the selection is up to everyone to decide for themselves. But, as you know, it is best to use combination Ctrl+ A, and not marking with the cursor, and even more so by executing the corresponding commands from various main or additional menus.

But it may appear here little problem. The fact is that some files may be involved in some process, and you cannot simply delete them. First, you will need to shut down the active services that use them, but the easiest way is to not have to figure out which process is blocking the files, just restart the computer and try to delete again. But this method does not always work.

Disk Cleanup Tool

One of the most effective methods can be called disk cleanup. It is the “native” tool of the OS that allows you to delete temporary files without damaging the system or services currently running.

To do this, use the disk properties menu, where you need to click on the cleanup button and select the items to be deleted. Is it possible to delete the Temp folder this way? No. As such, the directory remains on the disk, but its contents are completely cleared.

Cleaning via the command line

You can use and to clean out the temporary files directory, but entering long commands for each partition seems impractical.

The easiest way to create executable file with the .bat extension (for this you can use a regular 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 - This method of launching a BAT file allows you to clear all folders that are present on the system, without special effort. As practice shows, it is best to save such a file directly on the desktop in order to always have it at hand and execute it if necessary. 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 is probably already a little clear. Let's see how to get rid of its contents using special programs, usually called optimizers.

Any such package has a special module for searching and deleting temporary files, and it makes absolutely no difference where they are located. And, as a rule, it is involved in cleaning and optimizing the system by default, although if available necessary knowledge You can make your own settings. Let's explain with an example the simplest utility CCleaner.

Here in the cleaning section you need to pay attention to the tabs located on the right side (Windows and Applications). In principle, to carry out deep cleaning you can select all items, including not only temporary files, but also memory dumps, clipboard, system message history, etc. In fact, all this information can also be attributed to temporary objects, or, more simply, to ordinary computer trash. Everything else is simple. We activate the analysis process, and after issuing the results, we confirm the deletion of files using the appropriate button. As you can see, nothing complicated. By the way, it is the use of such programs that allows for the most complete and safe cleaning.

Conclusion

Here, in fact, is a brief summary of everything on the topic “Temp folder: what is it and how to clean it.” Naturally, in this case, means of optimizing directories of this type themselves using settings were not considered variable environments. But, I think, the average user by and large does not need this.

As for deleting 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, it’s a double-edged sword: for some, the system will automatically create a directory when rebooting, while for others it will crash altogether. So it’s better not to take risks, but to use either standard or third party tools cleaning. It will be much safer this way.

When running Windows operating system and third party software create temporary files, folder Temp- storage for them. Despite the fact that they should be deleted automatically, sometimes this process cannot be completed, for example, when you suddenly turn off the PC (using the power button), and the Temp folder becomes clogged, this can lead to dire consequences. That is why it is extremely important to monitor its size and, if necessary, completely clean it manually.

The Windows 7 operating system has five Temp folders, two of which are the most used: and . We will talk about them further.

The first important Temp folder is located on the system drive and is located directly in the Windows folder, along with important system files. It is this that needs to be cleaned first, since it is most susceptible to clogging. For some users, this Temp folder weighs several tens of gigabytes!

We clean it manually, it’s very easy to do:

  1. Go to the folder Temp, which is located in the Windows directory.
  2. Select all the files located there.
  3. We remove them using a combination Shift + DEL.

Some files will be impossible to delete, since they are currently in use, we just skip deleting them and that’s it.

Appdata Temp folder is in system files each individual user, it is also often used by programs and various Windows services.

The path to it should be like this: system disk\Users\Username \AppData\Local\Temp, do not forget about cleaning it, it is done in the same way as cleaning windows folders temp. Attention, the AppData folder is hidden by default; to see it, enable the function, as described in the article.

To delete all temporary files you need to do the following:

This way we get rid of all temporary files in all Temp folders, it is advisable to repeat the procedure at least once a month, they can greatly slow down the work not only individual programs, but also the entire operating system.

There are a lot of different folders or processes in Windows that take up a lot of space, both physical and operational. Many users are so afraid of the computer and the OS that they don’t even want to get into the system disk, but sometimes this needs to be done. In particular, today I will write to you about the Temp folder.

What is the temp folder for?
IN operating system In Windows, many different processes are constantly occurring, belonging both to the OS itself and installed programs. In the process of this work, in order to preserve the intermediate or unfinished result of their activities, everything running applications create temporary data files and actively use them. It is precisely the Temp folder in Windows that is the storage of temporary files.

Where is the temp folder?
So it has about 5 paths, but usually it is located and takes up the most space along the path

(system_drive):\Users\(user)\AppData\Local\Temp


about AppData folder read the article

Is it possible to delete the temp folder
It is possible and necessary. This will not do anything to the system. But it’s better to do this before turning off the computer and ending the session. But you can enter it right now address bar conductor %USERPROFILE%\AppData\Local\Temp and, having selected everything, delete.
Be prepared that not all files and folders will be deleted. An error may appear indicating that they are busy.

How to clear the temp folder
You can use not the direct method described above, but a more correct one - through Disk Cleanup.
Right-click on the OS disk and select Properties. In this window, click the button Disk Cleanup

We are waiting for the information to be collected


Now select temporary files and clear


By the way, you can delete others too.

Let's modernize it a little this method and make sure that the temporary folder is cleared when the computer is turned off.

1) Click RMB on To my computer and choose Properties.
2) On the left edge select Advanced System Settings.
3) In this window we select Environment Variables


4) Changing the TEMP and TMP values


to C:/Windows/Temp



5) Create a file in Notepad with any name and content:

pushd %TEMP% && rd /s /q . > nul 2>&1
pushd %WinDir%\TEMP && rd /s /q . > nul 2>&1


and save with cmd extension.
For example alex.cmd
or download from here
6) Opening Editor group policies (Win + R-> enter gpedit.msc) and go along the path Computer Configuration -> Windows Configuration -> Scripts (startup/shutdown).
7) We highlight Completed work and click the link Properties