Video Screencast Help

Clear temp directories script

Created: 27 Jun 2013 • Updated: 09 Jul 2013
ScottM 2's picture
+4 4 Votes
Login to vote

I created this scrpt to address systems that have run our of disk space for various reasons and are no longer updating AV definitions. The only external utility you need is Psexec to remotely execute one of the scripts.

To clean a single system you would use: CleanMark2.cmd Systemname

To clean multiple systems, place all the systemnames in the BatchClrMk2.lst file and run the BatchClrMk2.cmd file.

As you would expect you need to run these logged in as an ID that can remotely access the admin shares and delete on these remote systems.

I had originally written this to do all the deletes via the master script file but cleaning systems that were connected via slow connections were a problem, remotely executing the commands to parse and clear the temp directories ended up speeding up the process by a serious measure.