"Temporary" files
Results 1 to 9 of 9

Thread: "Temporary" files

  1. #1
    Join Date
    Sep 2001
    Location
    Venezuela
    Posts
    41

    "Temporary" files

    Hey.
    I recently ran 'Disk Cleanup' from the Hard Disk's Properties and deleted everything it shows, including the Temporary files. Then I went to my C:\WINDOWS\temp directory only to find out that its size was 1.75GB (Yes, GB! Not MB or KB...). It has a lot more than 2000 files and more than 130 folders. I quickly browsed over the files and noticed that a lot of them were old files extracted from .zip files (using WinZip). What's up with this? Shouldn't Windows notify its users about this? Aren't the files in the temp directory part of the "temporary" files shown in the Disk Cleanup utility?

  2. #2
    IMM is offline Virtual PC Specialist!!!
    Join Date
    Nov 1999
    Location
    N. Vancouver, BC, Can.
    Posts
    2,438
    There are 2 temporary entries in Disk Cleanup. One is for temporary internet files and the other for files in your temp directory.

    That said - I'll assume you had both checked. I'm not sure about the disk cleanup tool regarding sub directories of temp - I always do it manually. Were these files in sub directories (folders) of temp?

    Another possibility comes to mind and that is that your temp directory is no longer located at c:\windows\temp (tho' that is the default location). It's possible to modify the location with statements in autoexec.bat such as
    SET TEMP=C:\MYTEMP
    or similar. To see what the current temp directory is you could open a dos box and type
    SET
    in it and hit Return (Enter). All the environment variables will then appear on the screen and your current temp setting should be among them.

    If you wanted to get cute you could enter
    command /kSET
    in the Start > Run box and click OK.
    Last edited by IMM; September 27th, 2002 at 01:59 PM.

  3. #3
    Join Date
    Sep 2001
    Location
    Venezuela
    Posts
    41
    Hey, thanks for the prompt reply.

    Regarding your first question: The files are not all in subdirectories. A lot of of them are in the root temp folder.

    I did what you said about checking the environment variables by typing SET in DOS. I found these two entries:
    TMP=c:\windows\TEMP
    TEMP=C:\windows\TEMP
    Is this normal? To have two diferent entries for the temp folder?

    Thanks again!

  4. #4
    IMM is offline Virtual PC Specialist!!!
    Join Date
    Nov 1999
    Location
    N. Vancouver, BC, Can.
    Posts
    2,438
    Yes it's normal. Some programs (notably Microsoft Development tools) use the TMP variable instead of the TEMP one. They can actually be set to point to different locations - tho' I don't recommend that except in very unusual cases.

  5. #5
    Join Date
    Jun 2001
    Location
    Albuquerque, NM USA
    Posts
    14,686
    Temp files should mean just that. They are temporary. Put a folder or two (or more!!) into the Recycle Bin and see if you see any problems. If none after a week, I think you can delete. (If you have problems, open Recycle Bin, highlight the deleted folders and click Restore.) Repeat until you get rid of all.
    I cannot say why they were not deleted when you ran DiskCleanUp. Are the files or folders "Read Only", by any chance?
    Last edited by Welshjim; September 27th, 2002 at 07:45 PM.
    Jim
    WIN7 Ultimate SP1 64bit, IE 11, NTFS,
    cable, MS Security Essentials, Windows 7 firewall

  6. #6
    Join Date
    Sep 2001
    Location
    Venezuela
    Posts
    41
    Nope, the files are not 'read only'.
    I don't know exactly how the Clean Up utility checks for temp files, but now that I think about it, the problem might be related to some registry problems I've been having.
    When restoring an old backup of the registry, Windows might "forget" about the files that are in the temp folder (can't keep track of them), just as it "forgets" about what programs are insatalled even though their files are physicaly in the hard drive. In other words: Windows has amnesia.
    I'm not sure about this, but it's just a thought.
    Thanks a lot for your replies.
    Last edited by gjab13; September 28th, 2002 at 01:29 AM.

  7. #7
    Join Date
    Apr 2001
    Location
    Iowa, USA
    Posts
    3,265
    When I was running w98 I used a batch file from the command prompt.

    smartdrv
    for %%x in (cookies history recent temp tempor~1) do deltree /y c:\windows\%%x\*.*


    Just copy and paste into notepad, name it gone.bat or whatever just so it's got the .bat extention. Then put it in your C: drive folder. Then when you want to run it, go to the command prompt only in DOS and type "gone" and hit enter. That should take them all out.

    I edited out the "cookies" reference as I managed them with another program.

  8. #8
    Join Date
    Sep 2001
    Location
    Venezuela
    Posts
    41
    Hey, that's a good idea.

  9. #9
    Join Date
    Mar 2001
    Location
    United ?
    Posts
    925
    I delete all kinds of stuff every time I boot, including all temp\tmp files. Never a problem, never a look back.

    Here is the content of my autoexec.bat file:

    IF EXIST C:\*.bak DELTREE /Y C:\*.bak
    IF EXIST C:\*.tmp DELTREE /Y C:\*.tmp
    IF EXIST C:\*.txt DELTREE /Y C:\*.txt
    IF EXIST C:\WINDOWS\AdvertX.ocx deltree /y C:\WINDOWS\AdvertX.ocx
    IF EXIST c:\WINDOWS\amcis.dll deltree /y c:\WINDOWS\amcis.dll
    IF EXIST C:\WINDOWS\advert203.ocx deltree /y C:\WINDOWS\advert203.ocx
    IF EXIST C:\WINDOWS\*.bak DELTREE /Y C:\WINDOWS\*.bak
    IF EXIST C:\WINDOWS\*.txt DELTREE /Y C:\WINDOWS\*.txt
    IF EXIST C:\WINDOWS\win386.swp DELTREE /Y C:\WINDOWS\win386.swp
    Note; I manage my swap file and this entry insures Windows does not add a swap file back in the Windows folder, as it has done in the past, only to leave me with two swap files and a non-functioning machine.
    IF EXIST c:\WINDOWS\COOKIES\*.* deltree /y c:\WINDOWS\COOKIES\*.*
    IF EXIST C:\WINDOWS\HISTORY\*.* DELTREE /Y C:\WINDOWS\HISTORY\*.*
    IF EXIST C:\WINDOWS\RECENT\*.* DELTREE /Y C:\WINDOWS\RECENT\*.*
    IF EXIST C:\WINDOWS\SYSTEM\amc deltree /y C:\WINDOWS\SYSTEM\amc
    IF EXIST C:\WINDOWS\SYSTEM\advert.dll deltree /y c:\WINDOWS\SYSTEM\advert.dll
    IF EXIST C:\WINDOWS\SYSTEM\amcompat.tlb deltree /y c:\WINDOWS\SYSTEM\amcompat.tlb
    IF EXIST C:\WINDOWS\SYSTEM\amstream.dll deltree /y c:\WINDOWS\SYSTEM\amstream.dll
    IF EXIST C:\WINDOWS\TEMP\*.* DELTREE /Y C:\WINDOWS\TEMP\*.*
    IF EXIST C:\WINDOWS\tempor~1\*.avi DELTREE /y c:\WINDOWS\tempor~1\*.avi
    IF EXIST C:\WINDOWS\tempor~1\*.asf DELTREE /y c:\WINDOWS\tempor~1\*.asf
    IF EXIST C:\WINDOWS\tempor~1\*.bmp DELTREE /y c:\WINDOWS\tempor~1\*.bmp
    IF EXIST C:\WINDOWS\tempor~1\*.exe DELTREE /y c:\WINDOWS\tempor~1\*.exe
    IF EXIST C:\WINDOWS\tempor~1\*.gif DELTREE /y c:\WINDOWS\tempor~1\*.gif
    IF EXIST C:\WINDOWS\tempor~1\*.jpg DELTREE /y c:\WINDOWS\tempor~1\*.jpg
    IF EXIST C:\WINDOWS\tempor~1\*.png DELTREE /y c:\WINDOWS\tempor~1\*.png
    IF EXIST C:\WINDOWS\tempor~1\*.mpeg DELTREE /y c:\WINDOWS\tempor~1\*.mpeg
    IF EXIST C:\WINDOWS\tempor~1\*.mpg DELTREE /y c:\WINDOWS\tempor~1\*.mpg
    IF EXIST C:\WINDOWS\tempor~1\*.mp3 DELTREE /y c:\WINDOWS\tempor~1\*.mpg
    IF EXIST C:\WINDOWS\tempor~1\*.ra DELTREE /y c:\WINDOWS\tempor~1\*.ra
    IF EXIST C:\WINDOWS\tempor~1\*.ram DELTREE /y c:\WINDOWS\tempor~1\*.ram
    IF EXIST C:\WINDOWS\tempor~1\*.zip DELTREE /y c:\WINDOWS\tempor~1\*.zip
    IF EXIST %winbootdir%\ShellIconCache deltree /y %winbootdir%\ShellIconCache
    IF EXIST %winbootdir%\tempor~1\*.* deltree /y %winbootdir%\tempor~1\

    REM end of permanent file, start of setup file.
    Last edited by Dudley; September 28th, 2002 at 03:06 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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