@echo off&setlocal enabledelayedexpansion
color 0a
:start
set var=D:\oracle\product\10.1.0\Db_1\BIN
set username=addranalyse
set password=jt888
set table=test
set /p choice=1.备份 2.导入 3.按任意键退出:
if %choice%==1 goto exp
if %choice%==2 goto imp
:exp
set /p file=请输入备件数据库的文件名:
set /p path=请输入存放的路径(记得输冒号:):
%var%\EXP.EXE %username%/%password% file=%path%\%file% TABLES=(%table%) log=d:\a.log
set /p choice=1.继续 2.按任意键退出:
if %choice%==1 goto start
:imp
set /p file=请将要导入的数据库文件拖入窗体内:
%var%\IMP.EXE %username%/%password% file=%file% TABLES=(%table%) log=d:\a.log
set /p choice=1.继续 2.按任意键退出:
if %choice%==1 goto start
标签:bat,set,goto,导入,file,任意键,oracle,choice%,log
From: https://blog.51cto.com/u_16255870/7534754