@echo off&setlocal enabledelayedexpansion color 0a :start for /f "tokens=2 delims==" %%a in ('path') do ( set "str=%%a" set str=!str: =+! for %%i in (!str!) do ( set "var=%%i" set var=!var:+= ! echo !var!>>change.txt for /f "delims=" %%i in ('findstr "oracle" change.txt') do set var=%%i )
)
set /p choice=1.备份 2.还原 3.按任意键退出: if %choice%==1 goto exp if %choice%==2 goto imp :exp del /q change.txt set /p file=请输入备件数据库的文件名: set /p path=请输入存放的路径(记得输冒号:): "%var%"/exp.exe smhr/smhr file=%path%/%file% full=n set /p choice=1.继续 2.按任意键退出: if %choice%==1 goto start :imp del /q change.txt set /p file=请将要导入的数据库文件拖入窗体内: "%var%"/imp.exe smhr/smhr file=%file% full=y set /p choice=1.继续 2.按任意键退出: if %choice%==1 goto start