title: How do I use an existing folder hierarchy structure as template to create new folder with the same hierarchy structure?
body: <p>I have created a working script that I've added to the windows registry. When a person right clicks in windows explorer, they can click on "Create New Job Folder" that creates a new folder with a specified hierarchy but it asks the user for the name of the folder. </p>
  
  <p>I'm trying to figure out how to edit my current script to create the hierarchy based on a certain folder. This folder will basically be a template so as I update the folder structure to better suit my needs, each subsequent folder I create using the script will reflect those changes. Thanks in advance for any help!</p>
  
  <p>Here is what I have in my current working script:</p>
  
  <pre><code>    set verbose=NO
      @echo off
  
      set mydir = %cd%
      cd %mydir%
      cls
  
      call:main
      goto:eof
  
      :main
      set /p job=Enter Job Name:
  
      call:check
  
      if %choice%==2 (echo Creating folder. Please Wait... &amp; timeout 1 &gt; nul &amp; 
  
      call:createDirectory)
      goto main
  
      :check
      echo[
      if exist "%job%" (echo ERROR: Folder already exists. Please choose a different name. 
      &amp; set choice=1) else (set choice=2)
      echo[
      exit /b
  
      :createDirectory
      md "%job%"
  
      md "%job%"\1.Development
      md "%job%"\1.Development\1.Budgets
      md "%job%"\1.Development\2.Manufacturers
  
      md "%job%"\"2.Plans and Specs"
      md "%job%"\"2.Plans and Specs"\1.Plans
      md "%job%"\"2.Plans and Specs"\2.Specs
  
      md "%job%"\3.Pricing
      md "%job%"\3.Pricing\1.Quotes
      md "%job%"\3.Pricing\2.Worksheets
  
      md "%job%"\4.Sumbittals
      md "%job%"\4.Sumbittals\"1.Submittal Reviews"
  
      md "%job%"\5.Orders
      md "%job%"\5.Orders\"1.Order Summaries"
      md "%job%"\5.Orders\"2.Confirmation Pages"
  
      md "%job%"\6.Closeout
      md "%job%"\6.Closeout\"1.O&amp;M Manuals"
      md "%job%"\6.Closeout\2.Warranty
  
      exit
  </code></pre>