Pete Long
asked on
Quick script - to create folders
OK Guys
I need to replicate a users problem
to do so I need a script that will generate some folders
top level
1
|
|
------2
|
|
---------3
etc etc - all the way to 200 folders deep all nested inside each other
NB Why I'm doing this: A client has a folder like this that he cant delete - Ive told him to use RD /S and Killbox and Gipo Move on boot on the folder - no joy.
I want to replicate the problem here but I don't want to manually create the folder structure
I need to replicate a users problem
to do so I need a script that will generate some folders
top level
1
|
|
------2
|
|
---------3
etc etc - all the way to 200 folders deep all nested inside each other
NB Why I'm doing this: A client has a folder like this that he cant delete - Ive told him to use RD /S and Killbox and Gipo Move on boot on the folder - no joy.
I want to replicate the problem here but I don't want to manually create the folder structure
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ah 84 folders will do - for now
Basically I wanted to see if
rd /s /q "startdir"
would delete them all and it did (up to 84 folders anyway) the client says his is 200 folders deep - so Im not sure why his WONT work - unless the path is too long for the command interpreter?
Basically I wanted to see if
rd /s /q "startdir"
would delete them all and it did (up to 84 folders anyway) the client says his is 200 folders deep - so Im not sure why his WONT work - unless the path is too long for the command interpreter?
I think its the path limit, 255 chars I imagine. As I suggested try creating a share further down or map a drive to part way down the tree and see if that works but yes the 81/84 seems to work fine!
Good luck
Steve
Good luck
Steve
ASKER
No Probs - Cheers Steve :)
c:
mkdir c:\startdir 2>NUL
cd \startdir
for /l %%a in (1,1,200) do mkdir %%a & cd %%a
Try this... goes down to 81 deep for me then fails.