If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Clean out Documents and Settings of old folders
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. |
Ads |
#2
|
|||
|
|||
Clean out Documents and Settings of old folders
For scripts,go to: http://www.microsoft.com/technet
At TechNet,locate the script center,library,a script like you wish to run may already be available.Also,download "scriptomatic",the utility is for writing scripts... "Rich" wrote: 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. |
#3
|
|||
|
|||
Clean out Documents and Settings of old folders
For scripts,go to: http://www.microsoft.com/technet
At TechNet,locate the script center,library,a script like you wish to run may already be available.Also,download "scriptomatic",the utility is for writing scripts... "Rich" wrote: 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. |
Thread Tools | |
Display Modes | |
|
|