Fast Export

Tools

Fast Export

I am using fast export batch mode on windows. I want to schedule fast export using batch file.
I want to know how do I include the currentdate in the export file name.

.BEGIN EXPORT SESSIONS 8;
.export outfile "Export.out"
MODE RECORD FORMAT TEXT;

I would like the export file to have the name "Export-20100106.out". Can this be done?
Tags (1)
1 REPLY
N/A

Re: Fast Export

You need to put your script in a bat file and run it from there.
(I presume the date you want is yyyymmdd!)

Try:

for /F "tokens=1-3 delims=/ " %i in ('date /t') do set tddt=%k%j%i
echo %tddt%
fexp << EOF >c:/outlog.txt 2>&1
.BEGIN EXPORT SESSIONS 8;
.export outfile "Export-%tddt%.out"
MODE RECORD FORMAT TEXT;
....
....
EOF

(This will create an output file with standard output and errors in c:/outlog.txt - set it to whatever you want.