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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top