Clean out Documents and Settings of old folders

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top