All pastes #2012890 Raw Edit

Folder Creator

public text v1 · immutable
#2012890 ·published 2010-12-07 14:51 UTC
rendered paste body
@echo off
cls
echo ##################
echo # Folder Creator #
echo ##################
echo.
:userinput
set /p amount=How many folders would you like to create?
set /p folder=What would you like to name the folders?
set /p subfolder=What would you like to name the subfolders?
set /p location=Please enter the full directory in which you wish to create %amount% folders:
set /p choice=Are you sure you wish to create %amount% new folders in %location%? (Y/N)
if %choice%==N goto :userinput
set start=0

:: Start of Main Routine

	:create
	mkdir %location%\"%folder% %start%"

		::Start of Sub-Routine		

		:subcreate
		set substart=0
		:subresume
		mkdir %location%\"%folder% %start%"\"%subfolder% %substart%"
		set /a substart +=1
		if %substart%==%amount% (goto :subend) else (goto :subresume)
		:subend

		:: End of Sub-Routine

	set /a start +=1
	if %start%==%amount% (goto :end) else (goto :create)
	:end
	
	:: End of Main Routine

	echo %amount% folder(s) have been created in: %location%
	pause