For statement to remove all subdirectories and files from within other directories
I'm looking to put together a for statement to delete subdirectories without deleting the root directory in addition to the directory below it. See example below.Dir 1 - Root Dir 2 - I DO NOT want todelet this directory Dir 3 - I want to delete this folder Dir 4 - I want to delete this folder Files inside Directory 4, etc, etc
August 24th, 2009 3:12am

Please be clear.Are you asking for script code for doing these or what is the exact task.If you want the script code then post these in scripting forum.
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2009 12:53pm

You can use powershell to do a simple script to remove these folders and subfiles.all you need to do is build a list of all folders within folder 1, then for every folder inside folder 1 (folder 2) delete its child items (but not itself)If you need actual script help email my profile
September 1st, 2009 3:51pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics