Hi,
I'm new at scripting and am trying to write en simple cmd script but keep getting the following error when i execute it:
'■F' is not recognized as an internal or external command,
operable program or batch file.This is the script below - I'm trying to do an export of an Oracle database.
FOR /F “TOKENS=1* DELIMS= ” %%A IN (’DATE/T’) DO SET CDATE=%%B
FOR /F “TOKENS=1,2 eol=/ DELIMS=/ ” %%A IN (’DATE/T’) DO SET mm=%%B
FOR /F “TOKENS=1,2 DELIMS=/ eol=/” %%A IN (’echo %CDATE%’) DO SET dd=%%B
FOR /F “TOKENS=2,3 DELIMS=/ ” %%A IN (’echo %CDATE%’) DO SET yyyy=%%B
SET date=%dd%%mm%%yyyy%
SET filename=exp%date%
expdp system/**** FULL=y DIRECTORY=dmpdir DUMPFILE=%filename%.dmp LOGFILE=%filename%.log
When I execute each statement manually, then I get the following error:
Export: Release 10.2.0.1.0 - Production on Zaterdag, 02 Oktober, 2010 14:06:11
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-39157: error appending extension to file "fullXEexp%dd%%mm%%yyyy%.log"
ORA-09314: sltln: error translating logical name
OSD-04503: text contains no translatable elements
When I execute only the expdp statement manually, without trying to append the date to the filename, it works fine!
In my cmd script, if I remove everything except the expdp statement (therefore no date attached to filenames), I get this error when executing the script (eventhough it works fine when executed manually):
'■e' is not recognized as an internal or external command,
operable program or batch file.Does anyone know why I'm getting this error and how to solve it?