Prevent Windows 10 from emptying %temp%

Page 1 of 4 123 ... LastLast

  1. Posts : 23
    Windows 10 x64, Pro
       #1

    Prevent Windows 10 from emptying %temp%


    Hi:

    New user here. Hopefully a very basic question. Windows 10 periodically seems to be going into my %temp% folder and deleting files (not all but many). I do not want this to occur: I am glad to manually weed out the junk and keep others (I occasionally find I want to revisit a file I have downloaded previously, say a spreadsheet). I would say this happens about once a week but I this is a guess: there is no message that it has occurred, i just see once in a while that some files have disappeared.

    I am guessing this is the disk cleanup tool but cannot be sure (and even if so I cannot figure out how to stop it from doing this). Is there a way for me to disable this?

    OS Win x64 Pro
      My Computer


  2. Posts : 6,976
    windows 10
       #2

    Welcome to the forum. It's not that simple there is a setting in Windows to clear it as part of maintenance but it's not just Windows software doing updates will write there and should delete files when finished but often don't Andy software can use it and many use it daily. Also what temp folder do you refer to if you open a CMD prompt type set you will see more than one tmp folder
      My Computer


  3. Posts : 23
    Windows 10 x64, Pro
    Thread Starter
       #3

    Thanks Samuria.

    I mean this folder: C:\Users\<username>\AppData\Local\Temp
      My Computer


  4. Posts : 5,200
    Windows 11 Home
       #4

    It is a temporary folder, it is meant for one time only, the files are usually kept for 30 days, in case they are needed. You could use a script or a backup software, which would copy its content somewhere else periodically or something like that.
      My Computer


  5. Posts : 1,513
    X
       #5

    1. Files meant to be kept won't be in that temp folder.
    2. When you download files (to be kept or not) they should not go into that temp folder.
    Conclusion: Ignore the temp folder. There's nothing to see there.
      My Computer


  6. Posts : 23
    Windows 10 x64, Pro
    Thread Starter
       #6

    Thanks for the responses.

    But I was not interested in *how* I should be using folders I am asking *why* this is happening. What specifically is causing Windows to delete certain files in this folder? What program is doing it, and is there a way to tailor its actions.

    Note that this is a new feature (at least in terms of some defaults) for Windows 10: this never happened with me using a Windows 7 PC for 5 years.
      My Computer


  7. Posts : 61,909
    64-bit Windows 11 Pro for Workstations
       #7

    Hello MonkeyMan, and welcome to Ten Forums. :)

    The other members are telling you "why" this was happening.

    The %Temp% folder has always behaved this way in Windows.

    The %Temp% folder is used as a working directory to only temporarily keep files in until no longer needed.

    You do not want to use the %Temp% folder for your downloads for obvious reasons. Saving your downloads in another folder (ex: "%UserPofile%\Downloads") will allow you to keep them until you manually delete them instead.
      My Computers


  8. Posts : 23
    Windows 10 x64, Pro
    Thread Starter
       #8

    Would it be possible to address what I asked? I want to know what process is doing this.

    I literally have never have had this happen on a Windows PC before, and if the OS is going about deleting filed without my knowledge I would like to stop that. These are only the ones I am aware of, it might be doing it in other folders.
      My Computer


  9. Posts : 5,200
    Windows 11 Home
       #9

    MonkeyMan123 said:
    Would it be possible to address what I asked? I want to know what process is doing this.
    Windows? It is hardcoded, it always was, for the record, there are several temp folders, like:
    Code:
    %temp%
    %LocalAppData%\Temp
    %WINDIR%\Temp
    MonkeyMan123 said:
    I literally have never have had this happen on a Windows PC before,
    If that happens, it is actually a bug, because it would accumulate too much data.
    Installers unpack to temp, so you could end up with like 1TB of data in temp folder.
      My Computer


  10. Posts : 61,909
    64-bit Windows 11 Pro for Workstations
       #10

    We are addressing what you asked, and have given you a solution to save your downloads and files in another folder. I'm sorry that it's not what you wanted to hear, but it is the truth.

    Windows automatically deleting files in your %Temp% folder is by design from day 1 of Windows.

    If you were to stop that, your hard drive space would start being used up pretty quickly, and could possibly start getting errors or other unknown issues from failing to be able to delete the temp files.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 03:52.
Find Us




Windows 10 Forums