hztccy 当前离线
二级士官
@echo off color 02 :主界面 cls echo. echo -------------------------------------- echo 1、目录1 echo -------------------------------------- echo 2、目录2 echo -------------------------------------- echo 3、目录3 echo -------------------------------------- echo. choice /c 123 /n /m "请选择对应功能" if %errorlevel% EQU 1 echo 目录1&goto :目录1 if %errorlevel% EQU 2 echo 目录2&goto :目录2 if %errorlevel% EQU 3 echo 目录3&goto :目录3 rem ------------------------------------------------------------------------------------------------------------- rem ------------------------------------------------------------------------------------------------------------- :目录1 cls setlocal enabledelayedexpansion set 序号=1 for /f "delims=" %%i in ('dir /b "NAS网盘路径"') do ( set 文件[!序号!]=%%~nxi echo ----------------------------- echo ^>^>^>(!序号!)%%i set /a 序号+=1) echo ----------------------------- echo. set /p 选择=-输入序号: robocopy "NAS网盘路径" "C:\123" "!文件[%选择%]!" /PURGE /IS cls set 序号=1 for /f "delims=" %%i in ('dir /b "C:\123"') do ( set 文件[!序号!]=%%~nxi echo ----------------------------- echo ^>^>^>(!序号!)%%i set /a 序号+=1) echo ----------------------------- start /wait "" "C:\123\!文件[%选择%]!" rd /s /q "C:\123" goto :主界面 exit rem ------------------------------------------------------------------------------------------------------------- rem ------------------------------------------------------------------------------------------------------------- :目录2 cls setlocal enabledelayedexpansion set 序号=1 for /f "delims=" %%i in ('dir /b "NAS网盘路径"') do ( set 文件[!序号!]=%%~nxi echo ----------------------------- echo ^>^>^>(!序号!)%%i set /a 序号+=1) echo ----------------------------- echo. set /p 选择=-输入序号: robocopy "NAS网盘路径" "C:\123" "!文件[%选择%]!" /PURGE /IS cls set 序号=1 for /f "delims=" %%i in ('dir /b "C:\123"') do ( set 文件[!序号!]=%%~nxi echo ----------------------------- echo ^>^>^>(!序号!)%%i set /a 序号+=1) echo ----------------------------- start /wait "" "C:\123\!文件[%选择%]!" rd /s /q "C:\123" goto :主界面 exit rem ------------------------------------------------------------------------------------------------------------- rem ------------------------------------------------------------------------------------------------------------- :目录3 cls setlocal enabledelayedexpansion set 序号=1 for /f "delims=" %%i in ('dir /b "NAS网盘路径"') do ( set 文件[!序号!]=%%~nxi echo ----------------------------- echo ^>^>^>(!序号!)%%i set /a 序号+=1) echo ----------------------------- echo. set /p 选择=-输入序号: robocopy "NAS网盘路径" "C:\123" "!文件[%选择%]!" /PURGE /IS cls set 序号=1 for /f "delims=" %%i in ('dir /b "C:\123"') do ( set 文件[!序号!]=%%~nxi echo ----------------------------- echo ^>^>^>(!序号!)%%i set /a 序号+=1) echo ----------------------------- start /wait "" "C:\123\!文件[%选择%]!" rd /s /q "C:\123" goto :主界面 exit复制代码
set /p 选择=-输入序号: robocopy "NAS网盘路径" "C:\123" "!文件[%选择%]!" /PURGE /IS复制代码
Fit 当前离线
TOP
set /p 选择=-输入序号: if not "%选择%"=="" (robocopy "NAS网盘路径" "C:\123" "!文件[%选择%]!" /PUR ... Fit 发表于 2021-12-13 19:56