I've written a batch file that creates a parent folder and subfolders like I want. However, I have 550 parent folders to make, so changing the directoryNAME variable each time isn't very efficient.
Instead, I've created a text file in which I've listed test names, one per line. The text file is in the same folder as the batch file and contains:
Test1
Test2
Test3
I'd like to have the following code to loop, replacing the directoryNAME variable, "Test1" each time with the string of the next product down the list until there are no more entries.
For example, in a perfect world, this code would run creating the parent folder "Test1", and then it would run again creating the parent folder "Test2" and so forth. These product names are located on individual lines in a text file in the same folder as the batch file.
SET directoryNAME="Test1"
SET filesNOTES="Files\Notes"
SET rootPATH="G:\My Drive\Company\Projects\Project1\Project1-1\Project1-1-1\Workflow\Generic Content"
mkdir %directoryNAME%
mkdir %directoryNAME%\Content
mkdir %directoryNAME%\Files\"Final Deliverables"
mkdir %directoryNAME%\Files\"Illustrator Files"
mkdir %directoryNAME%\Files\Notes
echo > %directoryNAME%\%filesNOTES%\FontInfo.txt
echo %directoryNAME%> %directoryNAME%\%filesNOTES%\FontInfo.txt
type %rootPATH%\FontInfo.txt >> %directoryNAME%\%filesNOTES%\FontInfo.txt
echo > %directoryNAME%\%filesNOTES%\"Mockup Notes".txt
echo %directoryNAME%> %directoryNAME%\%filesNOTES%\"Mockup Notes".txt
mkdir %directoryNAME%\Files\Notes
mkdir %directoryNAME%\Files\"Working PDFs"
mkdir %directoryNAME%\"Product Photos"\Finals
mkdir %directoryNAME%\"Product Photos"\PSDs
I have no idea how to do this, but everything I've learned about writing batch files I've learned from this site, so I thought I'd come here first and try to figure this out.
Per Stephan's suggestion below, I started the code with:
for /f "delims=" %%a in (ProductList.txt) do echo %%a
SET filesNOTES="Files\Notes"
I also changed all directoryNAME variables to %%a, however this outputs a parent folder with the title %a instead of a product name.
I'm sure I'm doing this wrong, but any help would be appreciated.