Created
October 28, 2016 19:39
-
-
Save vicnaum/28c0c1e91720d681ef259ec1371a73e3 to your computer and use it in GitHub Desktop.
Windows CMD batch file that creates many numbered folders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
ECHO Usage: manyFolders.cmd yourfoldername 500 3 | |
ECHO (where 500 is number of folders to create and 3 is a number of digits in folder number) | |
ECHO. | |
set count=%2 | |
setlocal EnableDelayedExpansion | |
for /L %%i in (1, 1, %count%) do ( | |
set "formattedValue=000000%%i" | |
md %1!formattedValue:~-%3! | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment