Как изменить расположение папки temp в windows 11

Привет, друзья. На днях что-то стал я подмечать, что моя Windows при проведении определённых операций ведёт себя туговато. Так, как в былые времена, когда она стояла у меня на HDD, а не на SSD. И тут я вспомнил, что какое-то время назад я переназначил расположение системных папок «Temp» на раздел, который находится на HDD. Я провёл очистку этих папок и вернул им их дефолтное расположение. Ну и, естественно, дела пошли значительно лучше. Вот и решил сделать небольшую заметку об этом нюансе работы с Windows. Итак, системными средствами можно сменить дефолтное расположение папок временных данных «Temp» на иное. В каких случаях это целесообразно делать? И, собственно, как это делается?

Перенос системных папок «Temp» на другой раздел или диск

Папки «Temp» Windows

Друзья, возможно, кто не в курсе, что за папки такие, о которых мы будем говорить. Это две системные папки хранения временных данных. Одна из них находится непосредственно в системном каталоге по пути:

C:\Windows\Temp

Другая располагается внутри профиля каждого пользователя по пути:

C:\Users\Имя_пользователя\AppData\Local\Temp

Более детально узнать о том, что это за папки, какую роль в работе Windows они играют, почему их нужно периодически чистить, вы можете из статьи сайта «Папка Temp в Windows». В этой статье, в частности, описывается процесс автоматизации очистки папок «Temp» с помощью переменных сред Windows. Ниже мы также будем работать с переменными средами, но в этот раз с целью переноса папок в другие места компьютера. И прежде, естественно, поговорим, о том, зачем это делать в принципе. Что кого может не устраивать при дефолтном расположении папок «Temp»?

{banner_google1}

Зачем менять дефолтное расположение папок «Temp»

Самые распространённые случаи, когда может быть целесообразно сменить дефолтное расположение папок «Temp» — это нехватка места на диске С в условиях невозможности увеличения его объёма и оптимизация работы Windows за счёт реализации RAM-диска. В последнем случае оптимизирующий эффект достигается за счёт реализуемого средствами оперативной памяти виртуального диска, на котором чтение и запись данных происходит с многократно увеличенными скоростями по сравнению с HDD. В моём же частном случае я, наоборот, переместил папки «Temp» с производительного SSD на медленный HDD. Зачем? Это была временная надобность, когда я исследовал возможности встроенного в Windows 10 гипервизора Hyper-V, который после обновлений 2018 года обзавёлся возможностью установки виртуальных машин в едином процессе загрузки их дистрибутива с серверов Microsoft. И вот этот дистрибутив с серверов Microsoft безапелляционно загружался как временные файлы в папки «Temp». Это были большие объёмы данных, планировалось исследование возможностей по всем предлагаемым операционным системам в таком вот едином процессе создания виртуальной машины и загрузки её дистрибутива с сети. Вот тогда, собственно, и стала необходимость в переназначении месторасположения папок «Temp» на раздел винчестера-файлопомойки. Поскольку средствами Hyper-V, как я уже сказал, смена каталога загрузки дистрибутива не предусматривалась.

Как перенести папки «Temp» в другое место

Чтобы перенести папки «Temp» в другое место, прежде на этом месте необходимо создать папку с названием, соответственно, «Temp». В нашем случае местом переноса папок пусть будет диск D. На нём создаём папку «Temp».

Теперь жмём клавиши Win+R. Запускаем свойства системы:

sysdm.cpl

Переключаемся на вкладку «Дополнительно». Внизу кликаем «Переменные среды…».

В верхней части окна переменных сред находятся опции правки путей расположения папки «Temp» в составе пользовательского профиля, т.е. внутри папки «AppData». Нам нужно изменить путь в значениях переменных «TEMP» и «TMP». Кликаем первую переменную — «TEMP», жмём «Изменить».

 

Меняем исходное значение на путь в нашем случае на диске D — D:\Temp. Жмём «Ок».

Теперь то же самое проделываем с переменной «TMP». Меняем её исходный путь на D:\Temp.

{banner_google1}

Теперь все временные файлы папки «Temp» в составе пользовательского профиля будут поступать в папку «Temp» на диске D.

Далее смотрим нижнюю часть окна переменных сред. В ней мы будем править путь папки «Temp», находящейся внутри системного каталога «Windows». Точно так же, как и в предыдущем случае, кликаем каждую из сред «TEMP» и «TMP», жмём кнопку «Изменить».

И меняем исходный путь на конечный — D:\Temp.

Готово.

Теперь осталось только перезагрузить Windows.

Как вернуть дефолтные значения переменных сред для папок «Temp»

Чтобы вернуть папки «Temp» на свои места – на диск С в каталоги «Windows» и «AppData», необходимо, соответственно, вернуть исходные значения переменных сред для папок «TEMP» и «TMP». Делается это точно таким же образом, как и задавались наши, пользовательские значения. Кликаем каждую из переменных сред и вводим дефолтное значение для «TEMP» и «TMP» в верхней части окна:

%USERPROFILE%\AppData\Local\Temp

Для «TEMP» и «TMP» в нижней части окна:

%SystemRoot%\TEMP

И перезагружаемся.

Временные файлы создаются программами при работе обычно в четко определенных папках в Windows, на системном разделе диска, и удаляются с него автоматически. Однако, в некоторых ситуациях, когда на системном диске мало места или это небольшой по объему SSD, может иметь смысл перенести временные файлы на другой диск (а точнее, переместить папки с временными файлами).

В этой инструкции пошагово о том, как перенести папки временных файлов на другой диск в Windows 10, 8 и Windows 7 с тем, чтобы в будущем программы создавали свои временные файлы именно там. Также может быть полезным: Как удалить временные файлы в Windows.

Примечание: описанные действия не всегда полезны с точки зрения производительности: например, если вы переносите временные файлы на другой раздел того же жесткого диска (HDD) или с SSD на HDD, это может снизить общую производительность программ, использующих временные файлы. Возможно, более оптимальными решениями в данных случаях будут описанные в следующих руководствах: Как увеличить диск C за счет диска D (точнее один раздел за счет другого), Как очистить диск от ненужных файлов.

Перемещение папки временных файлов в Windows 10, 8 и Windows 7

Расположение временных файлов в Windows задается переменными среды, при этом таких расположений несколько: системные — C:\Windows\TEMP и TMP, а также отдельные для пользователей — C:\ Users\ AppData\ Local\ Temp и Tmp. Наша задача — изменить их таким образом, чтобы перенести временные файлы на другой диск, например, D.

Для этого потребуется выполнить следующие простые шаги:

  1. На нужном вам диске создайте папку для временных файлов, например, D:\Temp (хотя это и не обязательный шаг, а папка должна будет создаться автоматически, рекомендую все же это сделать).
  2. Зайдите в параметры системы. В Windows 10 для этого можно нажать правой кнопкой мыши по «Пуск» и выбрать «Система», в Windows 7 — правой кнопкой по «Мой компьютер» и выбрать «Свойства». 
  3. В параметрах системы, слева, выберите «Дополнительные параметры системы». 
    Дополнительные параметры системы

  4. На вкладке «Дополнительно» нажмите кнопку «Переменные среды». 
    Изменение переменных среды Windows

  5. Обратите внимание на те переменные среды, которые носят имена TEMP и TMP, как в верхнем списке (пользовательские), так и в нижнем — системные. Примечание: если на вашем компьютере используется несколько учетных записей пользователей, то может быть разумным для каждого из них создать отдельную папку временных файлов на диске D, а системные переменные из нижнего списка не изменять. 
    Переменные для папок временных файлов

  6. Для каждой такой переменной: выберите ее, нажмите «Изменить» и укажите путь к новой папке временных файлов на другом диске. 
    Перемещение папки временных файлов

  7. После того, как все необходимые переменные среды были изменены, нажмите Ок.

После этого временные файлы программ будут сохраняться в выбранной вами папке на другом диске, не занимая при этом места на системном диске или разделе, чего и требовалось добиться.

Временные файлы на диске D

Если остались вопросы, или что-то работает не так, как нужно — отмечайтесь в комментариях, постараюсь ответить. Кстати, в контексте очистки системного диска в Windows 10, может пригодиться: Как перенести папку OneDrive на другой диск.

Download Windows Speedup Tool to fix errors and make PC run faster

We have already seen the nature of some temporary files like Temporary Internet Files, Index.dat file, Cookies, and Prefetch Files. In this article, we shall have a look at a few aspects of the Windows Temporary Files, which your computer creates, during the course of its normal running.

Temporary Files in Windows

What are Temporary Files in Windows 11/10

Temporary Files in Windows are those junk files whose use is only temporary and become redundant once the task in hand is completed. Such temporary files are created to hold data temporarily while a file is being created or processed or used.

Why are Temporary Files created

Windows Temporary files are created by the operating system during normal operation when there is not enough memory allocated for the task.

Software that uses large amounts of data, such as Graphics, Video, or Media editing software, also creates temporary files. These temporary files are often left behind even when the task is over, wasting disk space.

Temporary Files are also created for backup purposes, by programs. For instance, Microsoft Office saves a Temporary File of the open document every few minutes. If you save the document and exit, the Temporary File gets deleted. If the program crashes unexpectedly, the Temporary File is not deleted. They can thus be useful to help recover lost data if the program or the system crashes.

Ideally, the Temporary Files should get deleted once the program exits. But this is not always the case, leading to wasted disk space.

Temporary Files Location in Windows

The Temporary Files in Windows are typically found located in two locations – but they can be found elsewhere too:

  • %systemdrive%\Windows\Temp
  • %userprofile%\AppData\Local\Temp

If you click on C:\Windows\Temp you will receive a message You don’t currently have permission to access this folder. Click on Continue to do so. You will see that most of its contents are .tmp, .temp and .txt files.

The other folder typically located at C:\Users\username\AppData\Local\Temp, is created for each User. It’s a hidden folder and you will have to first ‘un-hide’ System folders from the Folder Options before you can see it.

The Temporary files created by the Windows operating system are usually stored in the %system%\Windows\Temp folder, whereas the ones created by the User when running any software is stored in his user profile at %userprofiles%\AppData\Local\.

Temporary Files of a particular software may also be located in a sub-folder, inside the parent folder of the particular software.

On rare occasions, a temporary file or a temporary files folder may get created into the root directory of the C (System) drive. You may want to examine the folder in details, and then delete it if you are sure, if it indeed contains temporary files.

Change the location of the Temp folder in Windows

If you wish, you can change the location of the Temporary Files folder. To do so, open System Properties via the Control Panel > Environment Variables > Edit the System and/or the User variables as you wish.

windows temporary files

But do remember that it is never a good idea to combine the temporary directories together for all the user profiles, for security reasons, since there have been cases of security vulnerabilities with temporary files, due to a particular software’s incorrect file permissions or race conditions.

Empty Temporary Files folder in Windows

There are several different ways to delete Temporary Files. You can use freeware junk file cleaners or the in-built Disk Cleanup utility to easily empty the contents of the Temp folders.

Related: What are tw tmp folders in System32 folder and Can you delete them?

Planning to empty the contents of your Windows Installer Folder or WinSxS directory due to its sheer large size!? Think again!

Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP (2006-16) & a Windows Insider MVP (2016-2022). Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

Sign in to your How-To Geek account

How to Move Windows' Temporary Folders to Another Drive

If you’re trying to save space on your system drive—say, if you have a space-starved solid state drive—moving Windows’ temporary files to another hard drive makes sense. Here’s how to do it.

If you have a small SSD, it’s nice being able to free up as much space on it as you can. We’ve looked at how to move your personal folders to another drive and how to move your OneDrive folder (or Dropbox folder) before, but the Windows temporary folder can also be pretty a pretty big space consumer. Sure, you can empty it out, but it’ll just fill up again. The good news is that the temporary folder is easy to move from your system drive to a larger storage drive and it won’t really impact performance at all.

Hit Start, type «system,» and then hit Enter or click the result.

In the System window, click the «Advanced system settings» link.

mtf_2

In the System Properties window, on the «Advanced» tab, click the «Environmental Variables» button.

mtf_3

In the Environmental Variables window, the top box shows user variables. Two of those variables—TEMP and TMP—are used by Windows and other apps to store files to a temporary folder. Note that these variables are specific to the user currently logged in, so if you have multiple user accounts on the PC, you’ll need to log in as each user and make these changes. Select the TEMP variable and then click the «Edit» button.

mtf_4

In the Edit User Variable window, type a new path for the TEMP folder into the «Variable value» box. Alternatively, you can click the «Browse Directory» button to browse to your desired location. If you use the browse method, just be sure you create the TEMP folder in the location you want it and then select it. When you’ve selected the new location, click «OK.»

mtf_5

Now, you’ll need to go back and repeat these same steps to change the location of the TMP variable to point the same new location. When you’re done, you can also close out the Environmental Variables and System Properties windows. You’ll need to restart your PC to have Windows begin using the new locations you specified for temporary files. You can always verify that the changes stuck by returning to the Environmental Variables window and making sure the new location is listed.

Introduction:

In Windows operating systems, temporary files are stored in a designated folder known as the temporary path. This folder is typically located in the system drive and is used by various applications and processes to store temporary data. However, there may be instances where you need to change the temporary path, either due to limited disk space on the system drive or for other reasons. In this guide, we will walk you through the process of changing the temporary path in Windows.

Step 1: Accessing the System Properties:

  1. Press the Windows key + R on your keyboard to open the Run dialog box.
  2.    
  3. Type sysdm.cpl and press Enter. This will open the System Properties window.
  4.  

Step 2: Navigating to the Environment Variables:

  1. In the System Properties window, go to the “Advanced” tab.
  2. Click on the “Environment Variables” button located at the bottom of the window. This will open the Environment Variables dialog box.

Step 3: Editing the TEMP and TMP Variables:

  1. In the Environment Variables dialog box, you will see two sections: User variables and System variables.
  2. Look for variables named “TEMP” and “TMP” under the “System variables” section.
  3. Select each variable (TEMP and TMP) one by one and click on the “Edit” button.

Step 4: Changing the Variable Value:

  1. In the Edit System Variable window, you will see the current path set for the variable.
  2. Change the path to the desired location where you want to store temporary files. You can either type the path directly or browse to the desired folder.
  3. Click “OK” to save the changes for both TEMP and TMP variables.

Step 5: Confirming Changes:

  1. Close all open windows and restart your computer for the changes to take effect.
  2. After restarting, you can verify that the temporary path has been changed by creating a temporary file or running an application that generates temporary files.

Conclusion:

Changing the temporary path in Windows can be useful in situations where you need to manage disk space more effectively or if you want to store temporary files in a different location for organizational purposes. By following the steps outlined in this guide, you can easily modify the temporary path to suit your requirements. However, exercise caution while making changes to system variables to avoid any unintended consequences.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Где найти диспетчер задач на windows 11
  • Windows admin center gateway
  • Mf toolbox canon windows 10 установка была прервана
  • Вылетает поиск в windows 10 на панели задач
  • Обновление windows 7 7601