关于主目录和命运目录的数据不足,如果需要,请进行一些更改:
@Echo OFF
:Name_menu
Set /P "Name=Enter the site name >>"
IF NOT DEFINED NAME (Set "Name=" & GOTO:Name_menu)
:Rounds_menu
Set /P "Rounds=Enter number of copies you want (Max 100)>>"
IF NOT DEFINED ROUNDS (Set "Rounds=Name" & GOTO:Rounds_menu)
If %ROUNDS% GTR 99 (Set "Rounds=" & GOTO:Rounds_menu)
:: I've assumed:
:: home dir is the script's dir
:: a folder with the name of the gived website name exists in home dir.
:: you want destiny dir to be "c:\inetpub\wwwroot\"
FOR /L %%# in (0,1,%ROUNDS%) DO (
MKDIR "c:\inetpub\wwwroot\%NAME%\%%#" >NUL
XCOPY /E /Y ".\%NAME%\*" "c:\inetpub\wwwroot\%NAME%\%%#\"
)
:: About "And adding sites into iis as specified times ..."
:: I don't know IIS and what you want, sorry.
Pause&Exit