title: Write a Batch file for automatically delete the OLD IIS log file
body: <p>Whenever i want to delete the old IIS logs files on my Shared WebServer i run this command on CMD:</p>
  
  <pre><code>for /R C:\HostingSpaces %f in (u_ex*.log) do del /q "%~ff"
  </code></pre>
  
  <p>It searches for IIS log files and will delete all of them. For sure it can't delete the current day's log files since they are already opened in IIS and can't be deleted.
  It shows me the progress of deleting log files one by one in command prompt console.</p>
  
  <p>i need to set a schedule task to run a BAT file to do this automatically each day.
  I have made a bat file and pasted this command within it:
  for /R C:\HostingSpaces %f in (u_ex*.log) do del /q "%~ff"</p>
  
  <p>But when i run the batch file nothing happens and i don't see any result and action.
  How to write a batch file for running this Command?</p>
  
  <p>Your help is much appreciate.
  Thank you </p>