用批处理实现文件备份器V2.3

2019-01-30 13:22:15刘景俊

:whether_over
cls
color 0c
title 文件备份器-路径已存在
echo.
echo.
echo.
echo.
echo.
echo ________________________________________________________________________________
echo.
echo          您输入的路径"%destination%"已经存在,覆盖还是追加?
echo.
echo ________________________________________________________________________________
echo.
echo     ╔══════════════════════════════════╗
echo     ║   按O覆盖,按A追加,按V查看保存目录,按 1 返回上一步,按 0 退出    ║
echo     ╚══════════════════════════════════╝
echo.
echo.
set choice=
set /p choice=                           请选择(O/A/V/0/1): 
if /i "%choice%"=="o" cls && goto over_write
if /i "%choice%"=="a" goto input_date
if /i "%choice%"=="v" call :view_directory && goto whether_over
if "%choice%"=="0" exit
if "%choice%"=="1" goto input_destination
goto whether_over

:whether_add
cls
color 0c
title 文件备份器-路径已存在
echo.
echo.
echo.
echo.
echo.
echo ________________________________________________________________________________
echo.
echo          "%destination%"下似乎已经存在以前的备份,覆盖还是追加?
echo.
echo ________________________________________________________________________________
echo.
echo    ╔═══════════════════════════════════╗
echo    ║  按 V 查看保存目录,按 O 覆盖,按 A 追加,按 1 返回上一步,按 0 退出 ║
echo    ╚═══════════════════════════════════╝
echo.
echo.
set choice=
set /p choice=                           请选择(V/O/A/0/1): 
if /i "%choice%"=="o" goto over_write
if /i "%choice%"=="a" cls && goto input_date
if /i "%choice%"=="v" call :view_directory && goto whether_add
if "%choice%"=="0" exit
if "%choice%"=="1" goto input_destination
goto whether_add
相关文章 大家在看