How to create multiple folders at once using a batch file

Sdílet
Vložit
  • čas přidán 24. 09. 2015
  • How to create multiple folders at once using a batch file
    Batch file commands (as used in this video):
    "@echo off
    md images videos articles\pages articles\posts"
    You can also use 'mkdir' instead of 'md'; both commands do exactly the same. To make folders with spaces in the folder name, use quotation marks. Example:
    md "Folder\Folder Name"
    #batchfile #batch
    Follow me on other media:
    ►Website: www.guidoshowtos.com
    ►Facebook: / guidoshowtos
    ►Twitter: / guidoshowtos
    Full instructions:
    First, create a batch file. Right-click,’New’, ‘Text document’, give it a name, and give it the .bat file extension.
    Click 'Yes'.
    Now right-click your file, and click 'edit'.
    Start the batch file with @echo off. This will prevent the commands from showing on screen when running the batch file.
    Now type ‘md’, which means ‘make directory’. This is the command for creating a folder.
    Then type a space, and the name of the folder you want to create.
    To create multiple folders at once, separate them with a space.
    To create a folder with a subfolder, type the name of the folder, then use the backslash (\), followed by the name of the subfolder.
    When you're done typing the names of the folders you want to create, click 'File' and, 'Save', and close the batch file.
    Double-click on your batch file to run it.
    And, it works! As you can see, it created all the folders I wanted to create, including this folder, with two subfolders.
  • Věda a technologie

Komentáře • 56

  • @ollyloosemore
    @ollyloosemore Před 4 lety +2

    Thank you so much for this. By far the easiest route I've discovered!

  • @XanderManCan
    @XanderManCan Před 6 lety +1

    That was so much simpler than I thought, thanks for the quick and concise tutorial!

  • @kirstenphelan1
    @kirstenphelan1 Před 2 lety +1

    Simple, easy, quick! Thank you for your help.

  • @curtjanus5220
    @curtjanus5220 Před 8 lety +16

    Great!!! Just saved me hours, I'm sure. Btw "Folder\Folder Name" for folders with spaces in their names. AND Folder\SubFolder1 Folder\SubFolder2 works.
    Thank you Guido,,, although you don't sound like any Guido I've ever met! haha!

    • @Guidoshowtos
      @Guidoshowtos  Před 8 lety +3

      +Curt Janus Awesome! Will add the info about using quotation marks to the description.
      So did you expect an Italian-American stereotype accent? Sadly, that's all my first name is associated with these days.

  • @amansoni2702
    @amansoni2702 Před 2 lety +1

    Such a simple and easy one. Thanks Pal!!

  • @LordSandwichII
    @LordSandwichII Před 8 lety +1

    This is great! So much quicker than going new folder>rename; new folder>rename.... etc. :)

  •  Před 5 lety +2

    clean and direct. thank you. useful.

  • @sheetalramesh6688
    @sheetalramesh6688 Před 7 lety +1

    Thank u verrrry much!! saved me hours of work :)

  • @PranavKaistha
    @PranavKaistha Před 7 lety

    This is great. Thank you so much!

  • @BenjaminMaverickWoods
    @BenjaminMaverickWoods Před 5 lety +1

    Legend, Thank you for your help!

  • @jodinetheron
    @jodinetheron Před 6 lety

    Wow that's amazing THANKS!

  • @MobileAppMogul
    @MobileAppMogul Před 2 lety

    BRILLIANT! thanks buddy

  • @pcruns
    @pcruns Před 8 lety +4

    Hi Guido's How-to's,
    Thanks for the bat file videos, they've already helped a lot.
    A client had music, docs, etc. all over his computer and I've used your bat file to move different file types into perspective folders.
    I was wondering though on if and how to make a bat file that would organize many individual music files into artist/album folders.
    I client has hundreds of individual tracks in the "Music" folder not separated into Artist/Album folders and it would make a lot more sense if it the individual tracks were separated into folders by Artist/Album.
    Is there a way to make a bat file that would do this?
    Could you please make a video on how to make this bat file and let me know if it can be done and when you've done it, if it can be done.
    Anyhow, I think you get what I mean. Thanks!!!
    John

  • @mfrankin6554
    @mfrankin6554 Před 6 lety

    Awesome!!!!! It worked very well. Thank you!

  • @darshitthakar7999
    @darshitthakar7999 Před 4 lety +1

    Thank you very much for your tip

  • @AshleyGlover
    @AshleyGlover Před 6 lety

    Do you have a video where you can ask for the main folder to be inputted by user via this batch command?

  • @kranthimo1
    @kranthimo1 Před 3 lety +1

    Thank you so much for this script. It will save me a lot of time.

  • @nexgen.graphics
    @nexgen.graphics Před 6 lety +1

    tysm...one more request. If I want to give the main folder a name at runtime, how can I do that?

  • @lizzetramirez5
    @lizzetramirez5 Před 7 lety

    how can I save individual files to individual folders in mass? For example all documents corresponding to one person saved to their employee file?

  • @tiffanipufee9945
    @tiffanipufee9945 Před 4 lety +2

    nice. . for more nice creation and Windows customization, google FolderChanger

  • @dariusperta5887
    @dariusperta5887 Před 4 lety

    Great job! Just a question. How can i add in name folders, characters with diactiric. thx, sir!

  • @chucktomahawk5352
    @chucktomahawk5352 Před 7 lety

    *now how would i do this with a program*
    *see what Im trying to do is open mutiple vbs scripts at once*
    *but it will only open one at a time*
    *PLZ HALP*

  • @retrocat
    @retrocat Před 4 lety

    how do you do the same thing but instead of folders text files?

  • @alexman2598
    @alexman2598 Před 4 lety

    Is there a way to create multiple subdirectories in one subdirectory? When I try, it ends up making a subdirectory inside the subdirectory inside the main.

  • @spongbob353
    @spongbob353 Před 8 lety

    Hey, Please I want a batch file to rename multiple FOLDERS at the same time
    se can you help me ? :D

  • @castillelarkin
    @castillelarkin Před 5 lety

    Sadly this approach did not handle áccéntéd vówéls well. Is there a workaround? But otherwise, a very easy approach! Also, say, I wanted to batch make a bunch of folders and place them all in one subfolder. How would I do that? Thanks.

  • @thatwastakenagain
    @thatwastakenagain Před 3 lety

    what is the easiest way to put an array of folder names into multiple folders

  • @DavidRojasElbirt
    @DavidRojasElbirt Před 6 lety

    is there a way to create also files with different extensions inside different folders? I need to create .docx, .xlsx, .pdf, .jpeg, with specific names, that can later be replaced with files with real content. I have to do this by hand everytime. I do repetitive tasks that generate the same folders and files each time, just varying in the parent file a sequential number.

    • @jonnyroka
      @jonnyroka Před rokem

      not sure about file in sub folders but in the main folder i do this: copy NUL "File Notes.docx"

  • @nuritnovis6029
    @nuritnovis6029 Před 7 lety

    Hi, this looks like a wonderful method and I'd love to try it but when I do, my computer says I don't have an app to run the bat file. Any ideas? Windows 10...

    • @nuritnovis6029
      @nuritnovis6029 Před 7 lety

      wait... I figured out what I did wrong and corrected it ("edit" not "open") and now it works like a charm. Thanks so much!!

  • @WindowsLove4216
    @WindowsLove4216 Před 8 lety +1

    I am unable to create multiple folders on Windows 8.1.Why? Maybe it works only on Windows 7?

    • @Guidoshowtos
      @Guidoshowtos  Před 8 lety +1

      +Windows Love As far as I know, batch files should work exactly the same on any Windows version.
      Have you tried running the batch file as administrator? Right-click on the file, then click on 'Run as administrator'.

  • @FosziPL
    @FosziPL Před 3 lety

    how to add .txt file with text in folder ?

  • @zennamok5428
    @zennamok5428 Před 3 lety

    You're clutch

  • @furryfan87243
    @furryfan87243 Před 6 lety

    I don't think this works for Windows 10, I did 'md foldertest\folderA Folderb' and it did foldertest fine with folderA as a subfolder but folderB is on the outside of foldertest.

    • @mrmvpick
      @mrmvpick Před 5 lety +1

      Looks like you'd need to do 'md foldertest\folderA foldertest\folder B' to get it to all be within the same folder. Otherwise it will make a new folder called 'Folderb' just in the original directory where your batch file is stored.

  • @trintolin
    @trintolin Před 2 lety

    Is there a easy way to create multiple dynamically named subfolders (for example 20 subfolders beginnig at m1 till m20 ), something like md m01 to m20

    • @raphaelbird1423
      @raphaelbird1423 Před 2 lety +1

      Yes, run a for loop that ads to a number every loop and use that number in your file name like this

    • @raphaelbird1423
      @raphaelbird1423 Před 2 lety

      Not the whole script but that's the idea

  • @user-sdp
    @user-sdp Před 8 lety

    how to make it in a different directory:
    cd\
    cd (Folder you want thats in your computer)
    md INSERT_FILE_NAME\INSERT_SUBDIR_NAME

  • @mohanytube
    @mohanytube Před 6 lety +1

    but mine remains as text document even after i made name with .bat

    • @castillelarkin
      @castillelarkin Před 5 lety +1

      Try going into the settings of your file explorer and unhiding file extensions.

  • @jimhowkings1974
    @jimhowkings1974 Před 5 lety +1

    what if there's a space in the name of teh folder ?

    • @hrushikeshborse
      @hrushikeshborse Před 5 lety

      ex:- "New Folder"
      just put in into inverted commas

  • @rizalmuhammadi437
    @rizalmuhammadi437 Před 5 měsíci

    what if you want to make folder name with space?

    • @Guidoshowtos
      @Guidoshowtos  Před 5 měsíci

      Use double quotation marks for the name (for example: "Example folder"), and it should work!

  • @antoniobradiano
    @antoniobradiano Před 7 lety

    done everything my shit dnt wrk. my cpu is alive and dnt want me to direct it lol. I haave a rampage 3 extreme ought to see thew bugs this thing has but is a beast

  • @alphaasphx7630
    @alphaasphx7630 Před 5 lety

    im getting errors

  • @zanderland4088
    @zanderland4088 Před 3 lety

    ummmm im in 2020