Adding date to TOAD Automation Export Schema

Is there a way to add a date to the filename that TOAD generates via Automation when GENERATING SCHEMA SCRIPTS?

I would typically use “Schemas _%date:~-4,4%%date:~-10,2%%date:~-7,2%” in a Batch file, but TOAD doesnt seem to like this file name.

I just tried putting c:%DATEFILE%.sql in that edit box and it worked fine for me. Then I tried your string and got an error. I think the syntax is bad.

Right-click on the filename edit box in “generate schema script” , choose “Variables”, and you can see the available choices for variables. You should use “datefile” and “timefile” to make sure that the filenames don’t have any illegal characters

-John

I made it more difficult that it was…Thanks John!

Is there a way to do the same when it exports data to a delimited text file that it compresses? It only seems to ask for folder. I’m probably missing something once again.

Rt-click in the RHS data tab grid and choose “export dataset”. It sounds like you are rt-clicking in the SB-LHS where multiselect is allowed (which is why it only asks for folder and not filename)

Thanks John - but what changes it is when I want to export all the table data. What I’ve been doing is going into the Dataset tab selecting tables and getting them all. At that point the output box on the options tab changes from file to directory - since it’s going to be doing more than one. I was hoping there would be a way I could “template” the files it creates or something else where I could add the date

Oh, so you do want more than one table, but still want to make the date as part of the file name? Sorry, there is no way to do that.

Is there a way to use the compression to compress all the results into one large zip?

(off to the idea page :slight_smile: )

Not within the export dataset dialog, but I think you could make a separate action to zip up everything in a folder and run that one afterwards.