Here is the batch file where I am trying for normal export backup but it is not working due to space in folder name DB Backup
for Backup file directory in file="D:\DB Backup\sys_12c_%fullstamp%.dmp"
. It works file if there in no space in folder name i.e. DBBackup
.
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "fullstamp=%YYYY%%MM%%DD%_%HH%%Min%%Sec%"
exp system/manager full=y file="D:\DB Backup\sys_12c_%fullstamp%.dmp" log="D:\DB Backup\sys_12c_%fullstamp%.log"
Use triple quoting:
exp system/manager full=y file="""D:\DB Backup\sys_12c_%fullstamp%.dmp""" log="""D:\DB Backup\sys_12c_%fullstamp%.log"""