Everything can be scripted to achieve whatever you want. This is the power of scripting. From the vbscript you can use icacls.exe to change folder permissions. Cheers, Jeremy. From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Angela Smith Sent: Tuesday, 28 September 2010 7:29 PM To: thin@xxxxxxxxxxxxx Subject: [THIN] Re: [nosig] RE: OT - Assistance with script to delete folders Hi I cannot delete the top level as the top folder has specific rights which are not inherited.. Would be good if I can delete everything except the top folder. Otherwise I would need to script the ACL modifications also. Users group needs modify access to the top folder.. Can this be scripted easily? Thanks Ang ________________________________ From: it@xxxxxxxxxxxx To: thin@xxxxxxxxxxxxx Date: Tue, 28 Sep 2010 08:52:54 +0100 Subject: [THIN] [nosig] RE: OT - Assistance with script to delete folders Hi, You might want to look at this: http://www.computing.net/answers/programming/vbscript-to-delete-all-subfolders/14650.html Easiest way would be to create a script to remove the top level folder and everything inside, and then recreate the top level folder. i.e. @echo off rmdir /s /q somedir mkdir somedir Regards IT Helpdesk IT Support BM Polyco Ltd Tel: 020 8443 9002 | Fax: 020 8443 9011 | E-Mail: it@xxxxxxxxxxxx<mailto:it@xxxxxxxxxxxx> Crown Road, Enfield, Middlesex, EN1 1TX Registered in England No 1368213 www.polyco.co.uk<http://www.polyco.co.uk> P Please consider the environment before printing this e-mail. From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Angela Smith Sent: 28 September 2010 08:12 To: thin@xxxxxxxxxxxxx Subject: [THIN] OT - Assistance with script to delete folders Hi Im trying to create a script that runs on server startup that deletes all files/folders in a specific folder but without deleting the top level folder C:\TEST FOLDER1 FOLDER2 etc I tried using rmdir c:\Test\ /s /q but this deletes the test folder. I need to delete all subfolders except c:\test. Any ideas on how I can do this?? Citrix Server is running on Windows 2003 Thanks Click here<https://www.mailcontrol.com/sr/t4YO8rZuyJbTndxI%21oX7Uk8r3ueBeE0sgOSFpGvEVNs+c1mFjgcCfbmj5KHvHT3EGLELryxzq6n02A3zwbO5JA==> to report this email as spam. BM Polyco Ltd Disclaimer This e-mail and the information it contains are confidential. If you have received this message in error please notify us immediately. You should not use or copy it for any purpose nor disclose its contents to any other party. The contents of this communication are advisory and are not binding on the Company unless supported by authorised documentation. This e-mail has been scanned for content by Websense Hosted Email Security<http://www.websense.com/>. ##################################################################################### Confidentiality and Privilege Notice This document is intended solely for the named addressee. The information contained in the pages is confidential and contains legally privileged information. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone, and you should destroy this message and kindly notify the sender by reply email. Confidentiality and legal privilege are not waived or lost by reason of mistaken delivery to you. #####################################################################################