@echo off
rem Get current date and time in a format that can be used in filenames
for /F "tokens=2 delims==" %%I in ('"wmic os get localdatetime /value"') do set datetime=%%I
set year=%datetime:~0,4%
set month=%datetime:~4,2%
set day=%datetime:~6,2%
set hour=%datetime:~8,2%
set minute=%datetime:~10,2%
set second=%datetime:~12,2%
rem Remove dashes from the date and time format
set dumpfile=portal_%year%%month%%day%%hour%%minute%%second%.dmp
rem Run the expdp command with the dynamically generated dumpfile name
expdp portal/portal directory=impdir dumpfile=%dumpfile% schemas=portal