Sunday, 30 August 2009

Emptying Windows XP temporary directories the Powershell way.

I previously blogged about emptying the Windows XP temporary directories with a batch file. For completeness, here is how to do the same thing with Powershell.

ri -rec $env:windir\temp\* -force
ri -rec $env:temp\* -force
if ($env:temp -ne $env:tmp)
{ ri -rec $env:temp\* -force }

0 comments:

Post a Comment