I’m trying to use the Automation Designer tool to create a dynamically named zip file. Basically I want the query run start date (sysdate -7 ) and end date (sysdate) appended to the end of the zip file name (example testfilename_ddmmyyyy_ddmmyyyy.zip). I have been able to successfully create dynamically named files in the past using the file iterator and variables on export data sets, but when I try the same steps to create an archive file it simply shows the variable holder (example testfilename_%zip_dt%.zip) in the file name.
Steps that I’m following:
- create Execute Script to get the dates and save them for later
set serveroutput on size 10000
set feedback off
l_filename4 varchar(50) ;
select to_char(trunc(sysdate-7),‘yyyymmdd’) ||’-’|| to_char(trunc(sysdate-1), ‘yyyymmdd’)
Outputting to Output2.txt
- Create a File Iterator with variable and archive
|-- Create Variable[postzip = c:\testfilename_%FileIterator1%.zip]
Items to compress = c:\samplefiles*.csv
The output2.txt creates correctly, the zip file compresses all csv files, but the new zip file is called %postzip%.zip
Hopefully, this makes sense.
Toad Version 188.8.131.52
Oracle 10g 64bit
THANKS IN ADVANCE!!