0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
@ECHO OFF REM CHOICE /? CHOICE /C 1234 /M "D盘E盘创建文件夹,D盘创建文件夹,E盘创建文件夹,退出" set/p ww=请输入客户名并按回车: REM set NowTime=%time% REM set dt2=%date:~0,4%%date:~5,2%%date:~8,2%.%time:~0,2%%time:~3,2%%time:~6,2% set dt=%date:~2,2%%date:~5,2%%date:~8,2% set name=%dt%-%ww% set dird=D:\%name% set txt=%dird%\%name%.txt set dire=E:\%name% REM if判断语句格式,这里注释掉了,只为观看 REM if %1==1 ( echo %1 )^ REM else ( echo %name% ) REM 暂停 REM pause REM 这里对数值判断需要按从大到小的顺序排列 if errorlevel 4 goto end if errorlevel 3 goto mye if errorlevel 2 goto myd if errorlevel 1 goto myde exit :myde md %dird% md %dire% echo %name% > %txt% start %txt% start %dird% start %dire% goto end :myd md %dird% echo %name% > %txt% start %txt% start %dird% goto end :mye md %dire% start %dire% goto end :end ECHO Good Bye |