All Forums Tools
ashishjoking12 1 post Joined 06/10
01 Jun 2010
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?

Jimm 298 posts Joined 09/07
01 Jun 2010

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.

You must sign in to leave a comment.