A quick way to clear your Temp folder in Windows

Posted by Adrian Tue, 23 Jun 2009 20:52:00 GMT

This tip explains how you can easily clear your Temp folder of all files (that are not currently locked).

Open a Command Prompt (this can be found in the Start Menu under Programs, Accessories, or alternatively choose Start -> Run and type cmd (followed by pressing enter)

Type:

rmdir %TEMP% /q/s 

If any files are locked (i.e. they are being used), they will be listed and a message will warn that "The process cannot access the file because it is being used by another process".

If you didn’t get any warnings, your Temp directory was just deleted in its entirety, and you need to recreate it:

md %TEMP% 

And that is the quickest way to delete all temporary files!


About

We are a small British company that produces business-oriented software and solutions. These articles are a product of our daily work - information that we think might be useful to share. We hope you find them useful.

Our Software

These are some of our products. Several are open source, some are web-based and others are proprietary:

Categories

Archives

Syndicate

ml> ._trackPageview(); } catch(err) {} ml> l> pageTracker._trackPageview(); } catch(err) {} ml> ._trackPageview(); } catch(err) {} ml> l>