Let's say I have a directory called Grandparent
Inside this directory are multiple other folders, Parent 1, Parent 2, etc.. My goal is to create a new folder, Child, inside each of the Parent folders.
For example, what I have:
Grandparent/
Parent1/
Parent2/
...
...
ParentX/
What I want:
Grandparent/
Parent1/
Child/
Parent2/
Child/
...
...
ParentX/
Child/
Is there a way to do this in CMD? (Note: I cannot download Powershell or any other convenient tool that would make my life easier, I am stuck with the default Windows Command Prompt)
Update
Following the links in the comments, I have tried the following:
for /r %%a in (.) do (
rem enter the directory
pushd %%a
echo In Directory:
mkdir testFolder
cd
rem leave the directory
popd
)
However, this creates the folder testFolder in every newly created folder:
Grandparent/
Parent1/
Child/
Child/
Child/
...
Parent2/
Child/
Child/
Child/
...
...
...
ParentX/
Child/
Child/
Child/
...
Child/
Child/
Child/
...