|I have been trying with the "for /f %1 in (myfile.txt) do ...", which as I understand it will perform the command after "do" to each line in the "myfile.txt". |
So first I used a "dir..." command to create a text file with the names of the client folders, each one on its own line. Saved it as list.txt.
Next I tried this -
for /f %1 in (list.txt) do md %1\contracts
What I found was 2 problems, 1- it kept recursively creating subfolders deeper and deeper until it errored out, and 2- it treated the comma and space in each line of list.txt as a delimiter, so it actually didn't create the subfolder "contracts" where I wanted it to.
I have focused the efforts first on just trying to get the command to recognize each entire line in the list.txt file as a single entity, but have been coming up short. So that meant changing up the command to something simpler, say just echoing back the info, like
for /f %i in (list.txt) do @echo %i
I've experimented with single and double quotes, etc, using the delims option, but nothing seems to work right to echo back each full line in the list.txt. Once it will echo back the full line, then maybe I can figure out a command/ set of commands to pass along to it.
Make any sense?