Click here to Skip to main content
15,889,200 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ok here's what I have and what I need.

say I have base directory and in it there are say 25 directories and in those directories are between 1 and 50 other directories and in those many others. etc ect :)

BaseDir
       Dir1
           subdir 1
           subdir 2
       Dir2
           subdir 1
       Dir3
           subdir 1
           subdir 2
           subdir 3


I need to delete anything beyond subdir x
they are just directories and no files

it can be fso or a dos batch command or most nix commands [via cygwin, so awk,grep,whatever is not out of the question]

I have tried loops and whatnot and I still end up just cursing.

please help me get some sleep in the next couple of days.
Posted

del /s *.*
rm -rf *

etc.
 
Share this answer
 
that was extremely helpfull. NOT

I know how to do all that what I needed was some kind of script that would do it automatically.
 
Share this answer
 
Comments
Richard MacCutchan 25-Jul-11 12:25pm    
What do you mean some kind of script that would do it automatically? Nothing in your original question makes clear what you want to do beyond deleting a part of a directory tree.
Member 2002284 25-Jul-11 13:37pm    
it can be fso or a dos batch command or most nix commands [via cygwin, so awk,grep,whatever is not out of the question]
Richard MacCutchan 26-Jul-11 9:50am    
You stated that in your original question, and it makes no more sense now than it did there. Try explaining exactly what you are trying to do that requires a script.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900