Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    Lounger
    Join Date
    Dec 2009
    Location
    New York, NY, USA
    Posts
    40
    Thanks
    14
    Thanked 1 Time in 1 Post

    TMP files: When can they be safely deleted?

    In an idle moment, I decided to search my C:\ drive for *.tmp files. Here's what turned up:



    As someone who runs CCleaner and Windows 7's Disk Cleanup utility pretty regularly, I was surprised to unearth so many undeleted tmp files!

    Don't know for sure, but am guessing that the forty-one Windows\SoftwareDistribution\Download\ files are leftovers from a Windows Update session. (They're all dated November 7, 2013, and the update session was aborted halfway through.)

    Of the seven remaining tmp files, four date back to November, and three are just a day or two old.

    Questions:

    1. Are all tmp files created equal?
    2. When is it safe to delete tmp files?
    3. Should I backup these files before deleting them?

    Thanks for your help.

    Brooks

    - - - - - - - - - - - - - - - - - - - - -

    Win 7 Pro, 64-bit
    Last edited by BrooksNYC; 2014-01-17 at 20:47.

  2. #2
    Silver Lounger
    Join Date
    Aug 2012
    Location
    UK
    Posts
    1,832
    Thanks
    30
    Thanked 249 Times in 243 Posts
    The easiest way to see the tmp files is to go Start, type %temp% then press Enter.

    I use CCleaner as well and after clearing the cache have still found files in there.

    Click on Organize - Select all - Organize - Delete and after the confirmation/delete check the box for Do this for all current items if the only file left is DebugLogFile.txt but you could also run Disk Cleanup as an admin.

  3. #3
    Lounger
    Join Date
    Dec 2009
    Location
    New York, NY, USA
    Posts
    40
    Thanks
    14
    Thanked 1 Time in 1 Post
    Thanks for chiming in, Sudo.

    Following your suggestion, I searched for %temp%. However, my results yielded no files or folders with a .temp extension. Instead, I got files and folders containing the letters "temp" within words, as in: template, tempeh, temple, temperature, tempo, contemplate, etc.

    The same thing happens if I search for *.temp. The search turns up no files with .temp extensions.

    However, a search for *.tmp yields lots of files with a .tmp (or .TMP) extension (as seen in my first post).

    It's those .TMP files I'm curious about. Most of them are in the C:\Windows\SoftwareDistribution\Download\ folder, and I'm wondering if it's safe to delete them.

    Again, thanks!
    Last edited by BrooksNYC; 2014-01-17 at 20:48.

  4. #4
    5 Star Lounger
    Join Date
    Dec 2009
    Location
    Rochdale, UK
    Posts
    851
    Thanks
    13
    Thanked 56 Times in 56 Posts
    Quote Originally Posted by Sudo15 View Post
    The easiest way to see the tmp files is to go Start, type %temp% then press Enter.
    The files mentioned by the OP are not in %temp% folder.

    Here's a discussion on the folder mentioned.

  5. The Following User Says Thank You to Browni For This Useful Post:

    BrooksNYC (2014-01-17)

  6. #5
    Lounger
    Join Date
    Dec 2009
    Location
    New York, NY, USA
    Posts
    40
    Thanks
    14
    Thanked 1 Time in 1 Post
    Thanks for the link, Browni.

    What a discussion! A lot of it was over my head, but by the end of the thread, I decided that it was okay to delete old .TMP files from the Windows\SoftwareDistribution\Download folder. I didn't touch anything else, and backed up the deleted files, just in case.

    So....we'll see!

  7. #6
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    2,825
    Thanks
    19
    Thanked 108 Times in 102 Posts
    Most of that discussion thread is irrelevant for your purposes!

    For the last several years I have run occasionally, perhaps weekly, a BATch file which contains
    DEL C:\*.TMP /S
    to delete all .TMP files from the system drive.
    That is, all .TMP files except those which are currently in use, each of which gives an "Access is denied." message.

    It also deletes .TMPLX and .TMPLL files from a couple of truly obscure WinSXS directories, but these seem happily to be recreated by <whatever> process.

    Be very careful to get the DEL line absolutely correct, otherwise Unhappiness Could Occur...
    BATcher

    Dear Diary, today the Hundred Years War started ...

  8. The Following User Says Thank You to BATcher For This Useful Post:

    DrWho (2014-01-21)

  9. #7
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    10,268
    Thanks
    130
    Thanked 1,153 Times in 1,062 Posts
    Running the disk cleanup app, cleanmgr.exe, and choosing the Clean up system files option, will allow to choose a lot of extraneous stuff, including temporary files, memory dumps, windows update leftovers, etc.

    Capture.JPG
    Rui
    -------
    R4

  10. #8
    Super Moderator CLiNT's Avatar
    Join Date
    Dec 2009
    Location
    California & Arizona
    Posts
    5,434
    Thanks
    128
    Thanked 495 Times in 455 Posts
    Ruirib's suggestion of using cleanmgr.exe is the safest and most benign means to remove temp files.
    If it allows you to remove the files in question it is safe.

    Other temp files located in the "User" section may be USEFUL to certain installed applications, but NOT vital.
    DRIVE IMAGING
    Invest a little time and energy in a well thought out BACKUP regimen and you will have minimal down time, and headache.

    Windows 8.1, 64 bit
    Motherboard: DX58SO2*Chipset: X58 Express/Intel ICH10*BIOS: SOX5820J.86A.0888.2012.0129.2203*Processor: Intel Core i7 CPU X 990
    GPU: Nvidia GTX 580*Memory: Corsair 12 GB, 4x3@1600*PSU: Corsair HX1000*Hard drives: REVO X2 160GB*OCZ VERT X3 120GB*5 mechanical storage drives (12 TB) total.

  11. #9
    Lounger
    Join Date
    Dec 2009
    Location
    New York, NY, USA
    Posts
    40
    Thanks
    14
    Thanked 1 Time in 1 Post
    Much obliged for your input, everyone.

    Ruirib, I've been running cleanmgr as wingman to CCleaner all along -- another reason I was surprised to unearth that nest of old .TMP files. (The Software Distribution Download folder would seem to be off limits to file cleaners.)

    Yesterday, I manually deleted all the old .TMP files from November. No ill effects so far, and I can restore the files if necessary.

    Thanks for posting your .bat script, BATcher. I may or may not have the cohones to use it, but have a blank .bat file ready to roll pending a surge of testosterone. Can I just copy and paste what you've posted there? (If I do run the batch file, I'll image my system first.)

    CLiNT, thanks for the tip. I found no .tmp or .temp files in my "User" folder, save those that are currently in use.

  12. #10
    Super Moderator BATcher's Avatar
    Join Date
    Feb 2008
    Location
    A cultural area in SW England
    Posts
    2,825
    Thanks
    19
    Thanked 108 Times in 102 Posts
    BrooksNYC, yes, you can run my BATch file exactly as is, if you want. I spend much of my life running BATch files, which I often prefer to these new-fangled GUI mechanisms, since more automatable.

    You may be slightly confused between %temp%, an environmental variable which points to the "TEMP" directory/folder and .TMP files, which may well be located in the %temp% directory/folder. I can't remember having come across files with the extension .TEMP (though no doubt someone will say that their hard disk is littered with the things!).
    BATcher

    Dear Diary, today the Hundred Years War started ...

  13. The Following User Says Thank You to BATcher For This Useful Post:

    BrooksNYC (2014-01-19)

  14. #11
    Lounger
    Join Date
    Dec 2009
    Location
    New York, NY, USA
    Posts
    40
    Thanks
    14
    Thanked 1 Time in 1 Post
    Thanks, BATcher!

    Quote Originally Posted by BATcher View Post
    You may be slightly confused between %temp%, an environmental variable which points to the "TEMP" directory/folder and .TMP files, which may well be located in the %temp% directory/folder.
    Not "slightly" confused.....totally confused. So thanks very much for the clarification!

  15. #12
    Bronze Lounger DrWho's Avatar
    Join Date
    Dec 2009
    Location
    Central Florida
    Posts
    1,228
    Thanks
    15
    Thanked 163 Times in 126 Posts
    Quote Originally Posted by BATcher View Post
    BrooksNYC, yes, you can run my BATch file exactly as is, if you want. I spend much of my life running BATch files, which I often prefer to these new-fangled GUI mechanisms, since more automatable.

    You may be slightly confused between %temp%, an environmental variable which points to the "TEMP" directory/folder and .TMP files, which may well be located in the %temp% directory/folder. I can't remember having come across files with the extension .TEMP (though no doubt someone will say that their hard disk is littered with the things!).
    God love the batch file!!!

    I was writing and using Batch Files before Windows ever reared it's ugly head.
    I too use a batch file to clean out CRAP, including all .tmp files from my hard drive.
    But there's a lot more in there besides .tmp files. There is also .Bak files and .Old files and the list just goes on and on. But a properly written Batch File can eliminate all that junk.

    I wrote one batch file that does a file count on the C: drive, then runs several lines to clean out known spots where windows stores Junk Files. Then it makes another file count and displays the difference, representing how many files were actually eliminated. On a PC that's had NO maintenance, that number can run from just a few thousand to literally Hundreds of Thousands of junk files.

    To keep my PC and the PC's of my elderly customers clean of junk, I put my everyday Cleanup.bat program in the Startup folder so it runs on every boot up. That keeps the HD pretty clean of junk.
    I call that my "Free Maid Service".
    Yeah, it doesn't get 'Everything', but it does keep the junk pile down to a manageable level.
    When I'm doing a thorough cleanup on my own PC, like before doing my weekly C: drive backup, I run a little program called "Temp File Cleaner" (yes, I have a link to it, but I won't post it here) and also a Retail Program called "Win Utilities".

    I've found over the years (34) that no one program ever gets everything that could be labeled as Junk.
    It takes several Programs and a concerted effort to really Clean UP a PC. It's what I do for a living, so I've gotten pretty darn good at it.

    Yes, as was already said (thank you) when writing a batch file to delete anything, very special care must be taken to get every letter and character exactly right, or the result can be disastrous.
    MS eliminated my favorite DOS program, "Deltree.exe". It was not only the most powerful DOS command, but also the most dangerous. It could be like Nitroglycerin in the hand of a child.

    For instance, Deltree /y C:\*.* would delete the entire C: drive, and never ask you "Are you Sure?".

    I do prefer it over "Del" because it's so powerful, and I've found a way to use it in Windows 8.1, with a little trickery.

    Cheers mates, Keep it clean!
    The Doctor
    Experience is truly the best teacher.

    Backup! Backup! Backup! GHOST Rocks!

  16. The Following 2 Users Say Thank You to DrWho For This Useful Post:

    BrooksNYC (2014-01-22),KimScoop13 (2014-01-29)

  17. #13
    Bronze Lounger DrWho's Avatar
    Join Date
    Dec 2009
    Location
    Central Florida
    Posts
    1,228
    Thanks
    15
    Thanked 163 Times in 126 Posts
    I'm sorry!
    I just had to add this little tidbit:

    The batch file as posted by our English friend,
    DEL C:\*.tmp /s

    can be enhanced to look for and delete a whole gaggle of junk files.
    For instance:

    DEL C:\*.tmp /s
    DEL C:\*.bak /s
    DEL C:\*.old /s


    And by specifying a directory to dump, you can get rid of a plethora of junk files.
    Even files that have no specific extension. Like this line to delete everything in the AVG Virus Vault:

    DEL "C:\$AVG\$VAULT\*.*"

    My own Cleanup batch file is over 20 lines long, to get rid of specific files.
    You can even empty your Recycle Bin with a line in a batch file. I do that too.

    Cheers Mates!
    The Doctor
    Experience is truly the best teacher.

    Backup! Backup! Backup! GHOST Rocks!

  18. The Following User Says Thank You to DrWho For This Useful Post:

    BrooksNYC (2014-01-22)

  19. #14
    Silver Lounger
    Join Date
    Aug 2012
    Location
    UK
    Posts
    1,832
    Thanks
    30
    Thanked 249 Times in 243 Posts
    I've used TFC on this laptop but for some reason or other it crashes the system on another one and both using Win 7 HP SP1.

  20. #15
    Lounger
    Join Date
    Dec 2009
    Location
    New York, NY, USA
    Posts
    40
    Thanks
    14
    Thanked 1 Time in 1 Post
    .
    BatchMasters, I bow to you!

    Doc, I ran searches for .bak. and .old files, and it was like opening the door on an overstuffed closet. Lacking the confidence of your elderly customers, I'm kicking the junk back in and slamming the door! (At least, for now.)

    Googling turns up more than one utility called Temp File Cleaner. Were you referring to the addpcs.com version, or Temp File Cleaner by OldTimer? (Am I permitted to ask these questions on this forum?)

    Quote Originally Posted by DrWho View Post
    Deltree /y C:\*.* would delete the entire C: drive, and never ask you "Are you Sure?".
    Cautionary note to self: Mustn't let Deltree /y BrooksNYC.person fall into enemy hands.

    Quote Originally Posted by DrWho View Post
    DEL C:\*.tmp /s
    DEL C:\*.bak /s
    DEL C:\*.old /s
    Excellent!

    Grateful thanks to all of you.

    Brooks

Page 1 of 3 123 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
  •