Options

Folder bat file

Lee HLee H Member Posts: 1,135
Hi

Is it possible to create multiple folders using a BAT file

I need to create folders called 108, 109, 110, 111 all the way to 374

I really dont want to do it manually

Pliz help

Thanks
.

Comments

  • Options
    tierstentiersten Member Posts: 4,505
    For loops and/or the "set /a" command. Google for it :P
  • Options
    Lee HLee H Member Posts: 1,135
    Hi

    Solved!!!

    Didnt think google was my friend on this but here is the solution

    In excel colum B enter folder names, In column A enter md

    md 112
    md 113
    md 114 etc....

    Save as default, then rename the extension to BAT
    copy the file to the folder you wish to create these folders and run

    Good trick!!
    .
  • Options
    DevilsbaneDevilsbane Member Posts: 4,214 ■■■■■■■■□□
    Never heard of using a excel file to do this, good to know.

    An easy way could be to use loops as well. This works since you are just adding one to each number. If you had to create 1 folder for each state (50 folderrs) then the loop isn't going to work. The loop would probably take less time than excel, but is also going to require a little more thinking.
    Decide what to be and go be it.
  • Options
    dynamikdynamik Banned Posts: 12,312 ■■■■■■■■■□
    Like Tiersten alluded to...
    FOR /L %%D IN (108,1,374) DO md %%D
    
Sign In or Register to comment.