Batch Folders
Posted: 17 Jul 2018 09:37
Afternoon;
I work for an architectural practice I have begun working with Batch Files to create our folder structure for when I new jobs arrives.
We have been working with the following;
@echo off
set /p id="Enter Project Name: " %=%
md "%id%"
md "%id%"\existing
md "%id%"\existing\models
md "%id%"\existing\drawings
md etc...
This seems to be working great to sit on the server for someone to run and create a simple folder structure.
My question is, due to the work we are doing is there anyway to do the following.
\\server\projects\level 0\"%id%"
\\server\projects\level 1\"%id%"
\\server\projects\level 2\"%id%"
Is there anyway to have the batch file in the projects folder then once the batch file is ran, a prompt appears asking which folder the directory wants to be created in, 0, 1 or 2 then once "2" has been entered for example the folder directory is then created in the level 2 directory. Rather than having 3 different .bat files in each level. I thought a simple "if" and "then" statement would work but I am unsure how these work within DOS.
This way we can understand which levels the different projects require.
Hope this makes sense, if not just ask for more information.
I work for an architectural practice I have begun working with Batch Files to create our folder structure for when I new jobs arrives.
We have been working with the following;
@echo off
set /p id="Enter Project Name: " %=%
md "%id%"
md "%id%"\existing
md "%id%"\existing\models
md "%id%"\existing\drawings
md etc...
This seems to be working great to sit on the server for someone to run and create a simple folder structure.
My question is, due to the work we are doing is there anyway to do the following.
\\server\projects\level 0\"%id%"
\\server\projects\level 1\"%id%"
\\server\projects\level 2\"%id%"
Is there anyway to have the batch file in the projects folder then once the batch file is ran, a prompt appears asking which folder the directory wants to be created in, 0, 1 or 2 then once "2" has been entered for example the folder directory is then created in the level 2 directory. Rather than having 3 different .bat files in each level. I thought a simple "if" and "then" statement would work but I am unsure how these work within DOS.
This way we can understand which levels the different projects require.
Hope this makes sense, if not just ask for more information.