Deleting temp files from current user only

  • Thread starter Thread starter david
  • Start date Start date
D

david

I am interested in writing a batch file that will delete some temp
folders that sit under C:\Documents and Settings\<current users
name>\Local Settings\Temp
I need it to work for any user that runs,
how can I make sure I erase only the current users certain temp files?
 
Place this batch file into
c:\documents and settings\all users\start menu\programs\startup:

@echo off
rd /s /q "%UserProfile%\Local Settings\Temp\FolderName"

This will delete the nominated folder for whoever happens to log on,
but in his own profile only.

If you have a netlogon script then you can place the line above into
this script.
 
Back
Top