Is there any tool that will programmatically delete ASP temporary internet files?
For manual deletion, we must drill down to subfolders and delete their contents before deleting it in the root folder.
It is time consuming for deleting the files each time, please advice on how to overcome this issue with a tool.
Delete ASP temporary internet files
If you happen to be using IIS 6 or later you could modify this power shell script and make it to stop and start so that it carries out the deletion.
param([string]$appPoolName, [switch]$stop)
Â
$appPool = get-wmiobject -namespace "rootMicrosoftIISv2" -class "IIsApplicationPool" | where-object {$_.Name -eq "W3SVC/AppPools/$appPoolName"}
Â
if($appPool)
{
  if($stop)
  {
     $appPool.Stop()
  }
  else
  {
     $appPool.Start()
  }
}
I hope this helps.
Â
Delete ASP temporary internet files
First of all, I did not understand why you should delete the ASP.NET temporary files. ASP.NET runtime engine efficiently handles deletion of temporary files in most cases.
Even in the worst case you think of deleting the content in the folder, you can write a simple batch file with the following commandÂ
Â
del C:~Folder location~*.*
Â
If want to run it at specified intervals, you can schedule execution of this batch file using Windows scheduler.
Â
Hope this solves your problem easily!