1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Will deleted folder recreate itself?

Discussion in 'Windows XP' started by hod, 2005/03/22.

Thread Status:
Not open for further replies.
  1. 2005/03/22
    hod

    hod Inactive Thread Starter

    Joined:
    2002/02/21
    Messages:
    32
    Likes Received:
    0
    If I delete the entire folder Local Settings\Temp, will it recreate itself?

    This would be a convenient way not only to periodically clear out the .tmp files but also to remove any empty sub folders, instead of having to delete them manually.

    I know that if I delete the History folder it does recreate itself, and I hope the same thing applies to the Temp folder.

    But before doing so I would appreciate an informed opinion.

    Many thanks.

    Hod
     
    hod,
    #1
  2. 2005/03/22
    Christer

    Christer Geek Member Staff

    Joined:
    2002/12/17
    Messages:
    6,585
    Likes Received:
    74
    Hi hod!

    A folder doesn't recreate itself but:

    Shell folders like the History folder get recreated through the registry when e.g. Internet Explorer is started or WinXP at reboot. You can distinguish some of the shell folders by their looks. Compare the History folder and the Temp folder in the spot You mentioned. Shell folders like "My music ", "My pictures" and others get recreated too.

    Do a search for shell folders in the registry editor and find all that will get recreated.

    I don't think that the Temp folder will get recreated automatically but I'm almost sure that it will get recreated by any application that needs to use such a folder.

    Deleting the contents of a folder but leaving the folder itself untouched is simple, high-lite the folder in the lefthand panel, ctrl-a will high-lite evrything in the righthand panel, delete will move the contents to the recycle bin, shift-delete will bypass the recycle bin.

    Christer
     

  3. to hide this advert.

  4. 2005/03/22
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    That Temp dir will NOT get recreated by windows after a reboot or a restart of explorer.exe. Some others WILL get recreated by windows:
    - Temp Internet Files
    - History
    - Cookies
    - My Recent Docs

    If you want a fast efficient cleanup by deleting certain dirs, put these lines in a notepad windows and save as cleanup.cmd :
    Code:
    taskkill /f /im explorer.exe
    RD /S/q  "%UserProfile%\Local Settings\Temporary Internet Files "
    RD /S/q  "%UserProfile%\Cookies "
    RD /S/q  "%UserProfile%\Local Settings\History "
    RD /S/q  "%UserProfile%\Recent "
    RD /S/q   "%UserProfile%\Local Settings\Temp\ "
    MD  "%UserProfile%\Local Settings\Temp\ "
    pause
    start explorer.exe
    RD S/q = Remove Directory & all sub folders without (Quiet) printing them on the command screen
    The temp dir is also deleted but gets recreated with MD (make Directory).
     
  5. 2005/03/22
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    An app will create a temp dir IF the app contains code to detect that the temp folder does not exist and code to create one. Not all apps contain code to do that so if temp dir goes missing then it may break some apps.
     
  6. 2005/03/22
    hod

    hod Inactive Thread Starter

    Joined:
    2002/02/21
    Messages:
    32
    Likes Received:
    0
    Thanks to Christer and TonyT for helpful advice.

    I already have a comprehensive clean up program (EastTec Eraser) which allows for any number of custom additions. Up till now I have always included Local Setting\Temp *.* which clears all the .tmp files nicely, but not any subfolders.

    I thought by deleting the whole Temp folder I'd kill two birds with one stone. The Temp subfolders appear only rarely and are usually all empty.

    Anyway I'll leave well alone and go manual if necessary.

    Hod
     
    hod,
    #5
  7. 2005/03/22
    PeteC

    PeteC SuperGeek Staff

    Joined:
    2002/05/10
    Messages:
    28,896
    Likes Received:
    389
    Another way ....

    Start > Run > %temp% and delete all including sub folders (generally there are a couple of temp files in use which will not delete).
     
Thread Status:
Not open for further replies.

Share This Page

  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.