How to create a dynamic file name for a scheduled Export action or Execute Script action? How to add / change the filename to have the Date & Time? Using Automation Designer | Export Dataset to Excel or Execute Script action.
Does Toad have capability to append or add a timestamp in the file name to make the file unique or for repeatedly running actions?
RESOLUTION 1:
One can add the dynamic environment variables, %DATEFILE%_%TIMEFILE%, into the name of the Excel file
e.g C:\Documents and Settings\user_name\Desktop\Test - %DATEFILE% - %TIMEFILE%.xlsx
and this will timestamp the file as such: Test - 2009_10_2 - 105809 AM.xlsx
RESOLUTION 2:
1) Go to View menu | Toad Options | Data Grids | Data
2) Under “Date Format:” | click the ellipses button (…)
3) Choose dash (-) as the “Separator”
4) Next continue to work on your Automation Designer | Export Dataset | to Excel
5) However, use a filename similar to this: Exp_Test_%sysdate%_%timefile%.xls. Basically, adding the “%sysdate%_%timefile%” in your file name will add the date and time.
Example generated file name: Exp_Test_06-02-2012_23019 PM.xls
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center