|I am testing relative performance and configuration of Hard Drives in different PC and through different network environments.|
To do this I am wanting to create some known constants of my own, as well as some learning along the way.
As a part of this I am trying to make a nested loop in a Batch CMD file but without success.
Can you please advise me as to what I am missing?
I am trying to create a directory with multiple sub-directories, each of these sub-directories containing multiple small files. The sub-directories and file names can just uniquely numbered.
This will give me a large chunk of small files to handle and test with. Later I will do the same creating larger size files and will then be able to create a more realistic test.
So far I have three lines that work individually at least in part but I cannot get then to work together.
Here is what I have so far:
Create a directory and make it current.
FOR /L %%f in (1,1,1000) do md %%f
This line will create the sub-directories as intended
FOR /L %%g in (1,1,1000) do echo abc > %%g.abc
This line will create the 1000 files as intended but only in the root directory, it does not recurse through all of the sub-directories to continue making the files in each of them.
FOR /R %%h in (1,1,1000) do echo cba > %%h.cba
Using the /R instead of /L I am able to get the CMD file to recurse through but it only created two files in each directory. one is named 1.cba and the second is 100.cba
How do I wrap the recursing ability of the third line around the working function in line two?