Clean out Documents and Settings of old folders

  • Thread starter Thread starter Rich
  • Start date Start date
R

Rich

Below is what I'm trying to accomplish. Does anyone have a good idea or a
script to do something like this? I tried writing a vbscript and it didn't
work out so well.

-iterate all the folders in the Documents and Settings area
-for each folder check its name against an exclusion list (such as
Administrator, Default User, All Users, etc...)
-if it is not an exclusion folder, get the date of the ntuser.dat file
inside the folder
-check that against the current date
-if it is older than 60 days, delete the folder.
 
Back
Top