------解决方案-------------------- set oracle_username=user set oracle_password=pass set oracle_sid=orcl set url=%oracle_username%/%oracle_password%@%oracle_sid% set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
for /f "tokens=1,2,3* delims=/" %%i in ('echo %date:~0,10%') do ( set today=%%i-%%j-%%k )
winrar -inul a %rar_dir%\dmp_%today% %rar_dir%\%oracle_username%_%today%.dmp
echo wscript.echo dateadd("d",-7,date) >>tmp.vbs for /f "tokens=1,2,3* delims=/" %%i in ('cscript /nologo tmp.vbs') do ( set rq=%y%-%m%-%d% ) del tmp.vbs
for /f "tokens=1,2,3 delims=_." %%i in ('dir /b %rar_dir%') do ( if %%j LSS %rq% del /f %rar_dir%\%%i_%%j.%%k )