Windows Server 2000/2003 Thread, Delete folders with exceptions in Technical; In the documents and settings folder there is a long list of old user folders. I need to delete everything ...
13th December 2010, 10:20 PM #1
- Rep Power
Delete folders with exceptions
In the documents and settings folder there is a long list of old user folders. I need to delete everything but the "admin", "all users" and "default user" folders...
Here is the bat file I have, but I can't get it to exclude anything:
for /D %%j in ("C:\documents and settings\*") do RD /S /Q "%%j"
14th December 2010, 12:37 AM #2
i have a vb script at work for this will dig it out and post it in morning
14th December 2010, 08:48 AM #3
Use delprof - much easier
As long as you don't have roaming profiles you can make the users a member of either the local or domain guest group which by design will delete there profile at log off.
If you use roaming profiles and do the above ref making them a member of the guest group it wont copy the profile back to the server and will delete it ( as per another thread on edugeek )
By ful56_uk in forum Scripts
Last Post: 30th April 2010, 11:46 PM
By mweller2000 in forum Scripts
Last Post: 23rd April 2009, 08:24 PM
By Baasha_Bhai in forum Scripts
Last Post: 2nd July 2008, 11:41 AM
Last Post: 4th June 2008, 01:30 PM
By Pumaedition in forum Scripts
Last Post: 22nd April 2008, 11:08 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)