Delete All the Subfolders in a Folder That Are Older Than 10 Days

Takes folder names listed in a text file and deletes all the subfolders older than 10 days.

 
 
 
 
 
(0)
Add to favorites
Storage
8/10/2009
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Works great in Windows 2008R2
    1 Posts | Last post May 05, 2011
    • Hi there, been running this successfully to delete metadata backup files on a Windows 2008R2 server. Want backup data but need to clean it once and a while.
      
      Now to my problem.
      I am running the script from C:\Program Files (x86)\SomeDir\
      
      The one that works has a logFolders.txt with only one line in it.
      C:\Windows\System32\inetsrv\backup
      
      The one that doesn't work also has a logFolders.txt (other name) with only one line in it.
      D:\Parallels\Plesk\Backup
      
      But the script doesn't seem to "see" the files in that directory. I've put files in the directory, set time and date on the files and it still can't delete them.
      I've even tried to open cmd as administrator and ran it from that cmd window with no success, any thoughts? Can it only delete files on the same directory as where you have the actual script?
      
      Thank you for a really great script.