Page 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: temp files

  1. #1
    2 Star Lounger
    Join Date
    Nov 2014
    Location
    Ohio
    Posts
    126
    Thanks
    0
    Thanked 1 Time in 1 Post

    temp files

    My computer skills are just average. I have no computer problems. I was just wondering about this. I got Windows 8.1 I allways delete my temp files. Why does Windows have 2 places to delete temp files ( %temp% ) and ( temp ), makes no sense to me. Thanks Chuck

  2. #2
    WS Lounge VIP access-mdb's Avatar
    Join Date
    Dec 2009
    Location
    Oxfordshire, UK
    Posts
    1,723
    Thanks
    146
    Thanked 156 Times in 149 Posts
    %temp% is a user variable and in my system goes to myname\AppData\Local\Temp

    Typing %temp% or temp in the address bar in file manager will open that folder. I assume that you are also referring to C:\temp or even C:\Windows\Temp. These are all different folders for temporary files. Why is something I don't know but I would like to learn!

    There's a bit more on http://www.itechtics.com/customize-w...ent-variables/ (search for 'environment variables' - no quotes for more info).

    BTW when you say (with every thread you start) "My computer skills are just average", are you referring to average on this forum or average for the whole world, or some other metric? Did you know that in many polls people say that they are above average (e.g. driving). This figure can be 70 to 80%. Obviously, they are wrong

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Chuck,

    Windows (User Level) actually only has one place:
    C:\Users\{Your UserID Here}\AppData\Local\Temp
    tempdirs.JPG
    As can be seen above there are two system environment variables {Temp & Tmp} that reference this same location. The %Temp% or %Tmp% is just how you reference the environment variable in a .bat or .cmd file.

    Windows (System Level) also has a temp folder at: C:\Windows\Temp

    Now you will find other temp folders & files written by applications programs all over your hard drive!
    Ex: C:\Temp

    This is why cleaning out temp files can be quite the challenge.

    HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  4. #4
    WS Lounge VIP Calimanco's Avatar
    Join Date
    Dec 2009
    Location
    UK
    Posts
    719
    Thanks
    1
    Thanked 144 Times in 130 Posts
    In a perfect world, you should never have to worry about temp files as they should remove themselves when whatever created them is closed down and they are no longer required. Its not a perfect world however, and some get left behind to clutter up the OS. This is where programs such as CCleaner and CCleaner Enhancer come in handy. Most seem to run CCleaner before closing down Windows, but if you do a before and after run, you will find that most of the temp files do indeed remove themselves at close down, so if you run the program at start up it will give you a much better idea of what actually needs to be removed and it will have much less work to do, useful if you have an SSD.

  5. #5
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,188
    Thanks
    47
    Thanked 983 Times in 913 Posts
    Quote Originally Posted by Calimanco View Post
    useful if you have an SSD.
    Why?

    cheers, Paul

  6. #6
    WS Lounge VIP Calimanco's Avatar
    Join Date
    Dec 2009
    Location
    UK
    Posts
    719
    Thanks
    1
    Thanked 144 Times in 130 Posts
    Unlike regular hard drives, all NAND flash-based solid-state drives, which are the majority of SSDs on the market, will permit a finite amount of writing. In other words, an SSD can be written to a limited number of times before it becomes unreliable. Not deleting files which are self deleting avoids wear and tear. Every saving in unnecessary read/write cycles helps longevity. It may not seem like much, but it soon adds up.

  7. #7
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,434
    Thanks
    372
    Thanked 1,457 Times in 1,326 Posts
    Although SSD reliability has been a hot topic this article seems to lessen the fears, at least for me. HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  8. #8
    Super Moderator
    Join Date
    Jun 2011
    Location
    New England
    Posts
    4,748
    Thanks
    171
    Thanked 649 Times in 572 Posts
    Quote Originally Posted by Calimanco View Post
    Not deleting files which are self deleting avoids wear and tear.
    A file can only be deleted once.

  9. #9
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,760
    Thanks
    26
    Thanked 424 Times in 338 Posts
    Temporary files are all over your drive, not just in TEMP and %TEMP%. Many programs write temporary files within their own subfolders in Program Files or Program Files (x86). Windows (as well as other software/hardware vendors) writes temporary files all over the place inside the Windows folder.

    For example, "C:\Windows\Inf\Intel Storage Counters\tmpF7B1.tmp", which has been there since 5:38 PM 8/24/2014. There are also gobs of 0 byte tmp files in equally obscure places, such as "C:\Users\bbearren\AppData\LocalLow\PlayReady\Cach e\indiv01.tmp", a 0 byte temporary file ("Cache" comes out as "Cach e"—a peculiarity of the Forum Reply box formatting).

    There are even temporary files that are system-level write-protected to the extent that one cannot even take ownership of the file and delete it.

    Regardless, whatever means you are using to get rid of all your temporary files, know that you probably aren't getting rid of all your temporary files. Just highlight your system drive and do a search for "*.tmp" to see if there are any leftovers.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  10. #10
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,760
    Thanks
    26
    Thanked 424 Times in 338 Posts
    Quote Originally Posted by BruceR View Post
    A file can only be deleted once.
    Normal file deletion does not delete the file per se, even once; it just removes the file header and footer, making the space unprotected and available for writing, but the file contents (all the 1's and 0's) are completely intact and undisturbed until that particular space is actually overwritten. That's what file recovery utilities look for and recover. The Recycle Bin "remembers" the file header and footer, and as long as the deleted file is in the Recycle Bin, its space on the disk remains protected. When the Recycle Bin is emptied, the headers and footers of the files therein are removed, and the space on the hard drive is made available to the file system.

    SSD firmware looks for truly "empty" locations to write new files, to improve write speed. Without TRIM, an SSD can get filled up with a combination of actual files and "non-empty" file ghosts. >>edit: not actually filled, but without TRIM, all truly empty locations will be written to before the SSD starts doing the erase/write thing to "deleted" file locations, which would noticeably degrade write performance, since every write would then require an erase first<<.

    So in order for a file to be truly deleted, it must be "deleted" twice at a minimum, sometimes more than twice, depending on the length of the original file. The first deletion is simply the removal of the files "markers" for the file system. The actual deletion happens when the file is completely overwritten. If the original file was quite large, it might take a number of writes to completely overwrite the original file and truly "delete" it.
    Last edited by bbearren; 2015-01-04 at 15:19. Reason: clarity
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  11. #11
    Super Moderator jwitalka's Avatar
    Join Date
    Dec 2009
    Location
    Minnesota
    Posts
    6,794
    Thanks
    117
    Thanked 799 Times in 720 Posts
    I agrre with everything Bruce said but you can bypass the recycle bin by highlighting the file and doing a Shift + Delete making the file space immediately available to be overwritten.

    Jerry

  12. #12
    Super Moderator
    Join Date
    Jun 2011
    Location
    New England
    Posts
    4,748
    Thanks
    171
    Thanked 649 Times in 572 Posts
    Quote Originally Posted by bbearren View Post
    Normal file deletion does not delete the file per se, even once; it just removes the file header and footer, making the space unprotected and available for writing, but the file contents (all the 1's and 0's) are completely intact and undisturbed until that particular space is actually overwritten. That's what file recovery utilities look for and recover. The Recycle Bin "remembers" the file header and footer, and as long as the deleted file is in the Recycle Bin, its space on the disk remains protected. When the Recycle Bin is emptied, the headers and footers of the files therein are removed, and the space on the hard drive is made available to the file system.

    SSD firmware looks for truly "empty" locations to write new files, to improve write speed. Without TRIM, an SSD can get filled up with a combination of actual files and "non-empty" file ghosts.

    So in order for a file to be truly deleted, it must be "deleted" twice at a minimum, sometimes more than twice, depending on the length of the original file. The first deletion is simply the removal of the files "markers" for the file system. The actual deletion happens when the file is completely overwritten. If the original file was quite large, it might take a number of writes to completely overwrite the original file and truly "delete" it.
    How can I delete a temporary file twice?

  13. #13
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,760
    Thanks
    26
    Thanked 424 Times in 338 Posts
    Quote Originally Posted by jwitalka View Post
    I agrre with everything Bruce said but you can bypass the recycle bin by highlighting the file and doing a Shift + Delete making the file space immediately available to be overwritten.

    Jerry
    True enough, but the file is still not truly "deleted" until the space has been actually overwritten. I once spent about 5 days recovering data from a hard drive that had been "deleted" by malware. The recovery software converted "file-like" strings and gave them headers and footers and names, beginning with "R0000001" and with a .txt extension. After the software completed its run (2-3 hours, as I recall), each individual file could be opened and read as a text file. Luckily, the client had hard copies of all the critical data files (mostly .doc, some .xls) that I could compare to the recovered file.

    In the end, we recovered every file that the client considered to be critical, reinstalled Windows, and restored the recovered files with file names commensurate with their contents. Word docs and excel files retained all their formatting in the "deleted" files.

    There is a lot of chance involved in the overwrites, as well. NTFS looks for the first contiguous space large enough to hold a file to be written, and when it locates that space actually writes the file. If the "deleted" file is large, but the next file to be written is small, NTFS may well find a large enough space to fit the new file before it gets to the space where the large "deleted" file was, leaving it still intact, just without header and footer.

    Similarly, if the deleted file is quite small, its space might be skipped over a number of times while NTFS is looking for a larger contiguous space in which to write a larger file. JPEG files quite often get shunted into the deeper cylinders of a disk because of the size of the file, leaving lots of contiguous but too small available spaces in the outer reaches.
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  14. #14
    Super Moderator bbearren's Avatar
    Join Date
    Dec 2009
    Location
    Polk County, Florida
    Posts
    3,760
    Thanks
    26
    Thanked 424 Times in 338 Posts
    Quote Originally Posted by BruceR View Post
    How can I delete a temporary file twice?
    You quoted it; did you not read it?
    Create a fresh drive image before making system changes, in case you need to start over!

    "The problem is not the problem. The problem is your attitude about the problem. Savvy?"—Captain Jack Sparrow "When you're troubleshooting, start with the simple and proceed to the complex."—M.O. Johns "Experience is what you get when you're looking for something else."—Sir Thomas Robert Deware.
    Unleash Windows

  15. #15
    Super Moderator
    Join Date
    Jun 2011
    Location
    New England
    Posts
    4,748
    Thanks
    171
    Thanked 649 Times in 572 Posts
    Quote Originally Posted by bbearren View Post
    You quoted it; did you not read it?
    I read your stuff about what a computer does with a deleted file.

    But I originally commented on a user practice which was recommended to be avoided.

    So I'm trying to understand how that practice can be accomplished so that I can avoid it.

    If I delete temporary files, can they be re-deleted by a program?

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •