Share via

Creating Multiple Folders

Anonymous
2017-11-23T19:22:15+00:00

Is it possible to create multiple folders within a folder automatically. Eg. If you have a top level folder called Customers and you create a new customer folder within this folder called John Smith and with in that folder and all new folders within the Customers folder have the same set folders to start with. 

Example

Work Reports

Certs

Invoices

Quotes

Is there a way that this can me automated

Windows for home | Windows 10 | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2017-11-23T20:50:46+00:00

    Thanks for your reply. I definitely would like to know how to do it using a script 

    OK, here you go:

    1. Mark the code below with your mouse, then press Ctrl+C to copy it.
    2. Press the Windows key + R
    3. Type this command and press Enter:

    notepad  "%UserProfile%\Desktop\CreateFolders.bat" 4. Press Ctrl+V to paste the code lines. 5. Save & close the file.

    To create the set of subfolders, do this:

    1. Navigate to some new folder that lacks the subfolders.
    2. Grab the folder with your left mouse button, then drop it on top of the newly created desktop file.

    @echo off

    if "%1"=="" goto :eof

    md "%1\Work Reports"

    md "%1\Certs"

    md "%1\Invoices"

    md "%1\Quotes"

    echo Folder creation complete.

    pause

    5 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. Anonymous
    2017-11-24T13:28:15+00:00

    Hello, O that would be extremely helpful if you could advise on that option. 

    OK, here you go:

    1. Log on under an admin account.
    2. Download 2 files from here.
    3. Create the folder C:\Tools.
    4. Move the downloaded file "Create Subfolders.bat" to C:\Tools.
    5. Double-click the downloaded file "Create Subfolders.reg".
    6. Accept the challenges.
    7. Delete the previous desktop batch file.

    The tool is now installed. To use it, do this:

    1. Use File Explorer to navigate to D:\Customers.
    2. Right-click "John Smith".
    3. Left-click "Create Subfolders".

    You should now see the various subfolders under John Smith.

    If you require different or additional subfolders then you can modify the batch file C:\Tools\Create Subfolders.bat. Simply follow the existing pattern.

    1 person found this answer helpful.
    0 comments No comments

6 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-11-23T22:16:44+00:00

    Sorry, there were a couple of details I overlooked. Here is the refined version. Just right-click the existing batch file, then left-click Edit and replace the whole contents. Do NOT retype it! If you do not need any confirmation then you can remove the last two lines.

    Your query tickled my curiosity. After some experimentation I found that it is quite simple to invoke the script by means of the context menu that becomes visible when you right-click a folder. If you're interested then I'll post the exact instructions.

    @echo off

    if [%1]==[] goto :eof

    set Folder=%*

    for /F "delims=" %%a in ('echo %1') do set Folder=%%~a

    if not exist "%Folder%\Work Reports" md "%Folder%\Work Reports"

    if not exist "%Folder%\Certs"        md "%Folder%\Certs"

    if not exist "%Folder%\Invoices"     md "%Folder%\Invoices"

    if not exist "%Folder%\Quotes"       md "%Folder%\Quotes"

    echo Folder creation complete.

    pause

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2017-11-23T20:35:42+00:00

    Hi Frederick. 

    Thanks for your reply. I definitely would like to know how to do it using a script

    0 comments No comments
  3. Anonymous
    2017-11-23T19:57:14+00:00

    Is there a way that this can me automated?

    -> Yes, there is!

    You probably wanted to ask HOW to do it. The simplest solution requires a script. More elegant solutions would involve a registry hack to insert an extra context menu item.

    0 comments No comments