Share via


How to clear the files in Temp Folder when IIS is restarted ?

Question

Tuesday, October 11, 2011 7:45 AM

Hi,

How to clear the folders and files in Temp Folder when IIS is restarted i need the code  in ASP.NET Application?

Can anyone Please suggest me some link or code .

Thanks!!!

All replies (1)

Friday, October 14, 2011 3:34 AM ✅Answered

Hi,

Which temp folder are you referencing? "%systemdrive%\inetpub\temp"? If this is the case, you can simply use a delete command line to delete the folders and file. What you need to take care of is the account you use should have sufficient permissions for the delete operation.

Thanks.