I have a similar problem to this post, but I couldn't get the solution to work (I'm a total novice).
I have a set of folders on a network drive, each folder named after a manager (e.g. \sfnetfile\DEPT\HR_Manager\Manager, Test
and \sfnetfile\DEPT\HR_Manager\Manager, Test 2
). I am trying to get a folder/subfolder combo created in each manager folder of 2013\Variable
. In some cases managers already have a 2013
subfolder, but not the Variable
sub-subfolder (excuse the silly terminology).
I also want to prevent the batch file from creating the 2013\Variable
folder in existing other subfolders within each manager folders (so I don't want it, for example, creating another level down: \sfnetfile\DEPT\HR_Manager\Manager, Test 2\2012\2013\Variable
.
Here is my code:
FOR /d %A IN (\sfnetfile\DEPT\HR_Manager*) DO mkdir "%A"\2013\Variable