1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

DOS command question...

Discussion in 'Earlier Versions of Windows' started by whit44, Sep 22, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. whit44

    whit44 Thread Starter

    Joined:
    Sep 16, 2002
    Messages:
    48
    I'm attempting to access the WINDOWS\Temporary Internet Files folder/directory in DOS Command mode in order to delete a file that Windows won't allow me to delete or rename ("in use or disk full or writeprotected..." error). Problem is that that directory is not recognizably listed in the Windows directory.

    Btw, the file is archived but NOT write protected, so must be in use with Windows running. I also flipped the achived status off without affect. In the Win Dir, I looked specifically for something with the Dos label of "temp~1" format, and nothing showed up like that.

    Anyone have a clue? I'm NOT proficient in DOS at all, so if there's any suggestions, please be specific on the appropriate DOS commands/parameters.
     
  2. Styxx

    Styxx Banned

    Joined:
    Sep 8, 2001
    Messages:
    4,888
    Just boot into Safe Mode and delete the file. No need to use DOS.

    BTW that directory is called tempor~1. The total of the characters add up to 8. Six characters plus the ~1 = 8
     
  3. NiteHawk

    NiteHawk

    Joined:
    Mar 9, 2003
    Messages:
    4,699
    How to Delete in DOS and be done with it. Quick. Efficient

    Start > Shutdown and Restart in MS_DOS mode

    Once in DOS type in the following commands exactly:

    SMARTDRV.EXE

    CD \WINDOWS
    DELTREE /Y COOKIES
    DELTREE /Y HISTORY
    DELTREE /Y RECENT
    DELTREE /Y TEMP
    DELTREE /Y TEMPOR~1


    ctrl-alt-delete to reboot to windows

    Fear not, all of these folders will be recreated when you reboot windows.

    Now that you have gotten rid of that "land fill" called Temporary Internet Files, you may want to reboot into Safe Mode and run defrag.

    If you have never deleted Temporary Internet Files in the past, my guess is that you can recover 50 - 100 meg of HD space. Maybe more if you have never done it since day one.

    The most space I have ever recovered from someone's PC was a whopping 1.3 gig.

    Oh, by the way, boot time is slightly improved and you will notice a marked reduction in time to run a virus scan and defrag.


    Next power down and then as you start up hold down the crtl key (depending on manufacture some use the F8 key. If ctrl doesn't work, try again using the F8 key) Which ever way is successful you should now have a black screen with a menu of 5 or 6 choices. Select Safe Mode.

    Once in Safe Mode, click on Start > Run and type in scandisk
    This will take some time depending on the size of your HD and the speed of your PC in general.

    Also while in Safe Mode, click on Start > Run and type in defrag. Defragging in Safe Mode is faster because defrag isn't interrupted by the windows background disk and "house keeping" calls.

    Good Luck. Let us know how it works for you.
     
  4. NiteHawk

    NiteHawk

    Joined:
    Mar 9, 2003
    Messages:
    4,699
    Styxx, you can get rid of 90 to95% just by deleting from Windows Explorer. However, there are a number of hidden files, inclucing the index.dat file, that you won't be able to clean from windows.

    IF a person is not "afraid" of DOS the above method is fast and painless. I have the above, pluss a few other commands in a batch file named CLEAN.BAT.

    One command and it's done!! (y)
     
  5. Styxx

    Styxx Banned

    Joined:
    Sep 8, 2001
    Messages:
    4,888
    It's very advisable to do this in Safe Mode, the below is just FYI.

    If your at a DOS prompt, C:\>windows (for example) type, cd tempor~1, and strike Enter. Then type, dir /p, and strike Enter repeatedly to jog through the files within tempor~1. At the c:\>Windows\tempor~1 type, del *.*, and strike Enter. Type, dir, and press Enter to see if all the filles within tempor~1 are gone. That still leaves all the tyemporary Internet Files in you browsers Cache to Delete, but that can be done (and is advisable) through Windows.
     
  6. NiteHawk

    NiteHawk

    Joined:
    Mar 9, 2003
    Messages:
    4,699
    That's the HUGE difference between using
    DELTREE /Y TEMPOR~1
    and using
    At the c:\>Windows\tempor~1 type, del *.*
    DELTREE gets them all, del *.* only gets the ones in the TIF folder and leaves all the files in the Content.IE5 folders and it's 4 to 32 subfolders.
     
  7. whit44

    whit44 Thread Starter

    Joined:
    Sep 16, 2002
    Messages:
    48
    Ok, I found the TEMPOR~1 directory, although it doesn't show up in looking through the Windows dir, but did a "cd" to it which worked. Only thing is it had no files in it, only the two "." and ".." sub dirs whatever they are (could use some education there). Couldn't cd to them so bit the bullet and just did a DEL TEMPOR~1. LOL

    Unfortunately, the reboot rebuild of the INDEX.DAT file I was trying to dump from the CONTENT.IE5 folder, didn't solve my IE problem I was working.

    Before deleting the folder, I tried to delete the specific INDEX.DAT file while in the TEMPOR~1 prompt, even though it hadn't shown up in browsing the dir...it came up with file not found or something, which is when I decided to delete the folder entirely, assuming the file was buried in one of the "." ".." dirs.

    Btw. what's the difference between what I did and the DELTREE/Y TEMPOR~1 command? My deleted INDEX.DAT files generated ok with current date, so looks to me like the two commands both dump the Temp Internet Files folder and all sub-folders...not true?

    Had to chuckle at your "land fill" label, Nitehawk. Yep, it sure can get to be that, but I' m pretty good about cleaning it out periodically...plus typically do the scandisk (in Dos mode), dump history and OE deleted folder, empty recycle bin...THEN do the defrag in safe mode, which takes forever...and I only have 6 gigs...what the heck do people do with 50-100 gigs???

    Thanks all for your inputs...wish one of you had a good clue on my broke IE problem that precipitated the actions leading to this question (click here if interested).
     
  8. NiteHawk

    NiteHawk

    Joined:
    Mar 9, 2003
    Messages:
    4,699
    DOS, and all computers for that matter, are based on what is called Tree Structured Directories. C: or ROOT is the main directory (think tree trunk), all of the rest of the directories (folders) and sub-directories are nested under that.

    DELTREE means delete the tree structure starting with the directory that you specify and ALL other directories under that. It is a very powerful command!! Once the command is executed and confirmed, (no confirmation is asked for if you use the /y switch) that directory and all the subdirectories and files they contain are GONE!! I don't care if the directories are hidden, write protected, or what; they're GONE. Nothing escapes!!

    When you use that command be very careful to know both WHERE you are and the DIRECTORY SPECIFIED. No second chances.
     
  9. NiteHawk

    NiteHawk

    Joined:
    Mar 9, 2003
    Messages:
    4,699
    Yes, when you reboot windows recreates all those folders and the index.dat files. But they are all empty. At least until you get on the internet again. :D

    Some time ago I created a little batch file that would do all the cleaning mentioned above, plus more, then run scandisk in DOS, and then boot into Safe Mode and run defrag. I put it on a bootable floppy. That way, I just put in the floppy, power up, and do something else for a few hours.

    I don't use it too often because I prefer Norton's Speed Disk to defrag. With Speed disk you can tell it to put any type of file you want at the end of the disk. These would be files that don't change.

    Some suggestions would be mp3, wav, jpg, bmp, and so on. That way, If you can put maybe 20% of your files at the end, and they never change, they don't get fragmented so it cuts down on your defrag time. :)
     
  10. whit44

    whit44 Thread Starter

    Joined:
    Sep 16, 2002
    Messages:
    48
    Yeah, I understand that part, but question was, didn't I do the same thing with the DEL TEMPOR~1 command?

    Good concept on loading up static files at the end. Thought my Power Defrag would do that too, but not the old free version I have. Not even sure the $ version will either, so haven't bought into it to see.
     
  11. NiteHawk

    NiteHawk

    Joined:
    Mar 9, 2003
    Messages:
    4,699
    Yep, probably so. :D
     
  12. whit44

    whit44 Thread Starter

    Joined:
    Sep 16, 2002
    Messages:
    48
    And I thought *I* was a nightowl! :D
     
  13. NiteHawk

    NiteHawk

    Joined:
    Mar 9, 2003
    Messages:
    4,699
  14. Deke40

    Deke40

    Joined:
    Jun 27, 2002
    Messages:
    5,993
    I have no problem by just deleting the Content IE5 folder from windows. Use Winspy before and after and it will show the results.
     
  15. Wet Chicken

    Wet Chicken

    Joined:
    Sep 11, 2000
    Messages:
    10,674

    OK you said to type it in exactly like that.

    When you're in DOS, how do you get it to show up in a pretty bright RED like that? :D
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/166520

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice