I'd like to add the date to the file name of a DTS Export.
For Example:
Export092503.xls
I've tried various methods but nothing has worked as of yet.
Any ideas?
Thanks in Advance.
TechRickI export a standard file name, then rename using a BAT file. Here's the BAT file I use...
-------------------
@.echo off
c:
cd \SQL_Support_Applications\FTP Scripts\SONIC_Data
IF EXIST CUST_%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.dat DEL CUST_%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.dat
IF EXIST CUST_raw.dat REN CUST_raw.dat CUST_%DATE:~10,4%-%DATE:~4,2%-%DATE:~7,2%.dat
EXIT
-------------------
It checks to see if the dated file exists and deletes before renaming.|||Hi TechRick!
If I get you correct, you run an data export task in a dts package.
In this case you can use an ActiveXTask in this package to get the system date and modify the properties of the export task. A similar example is shown here: http://www.sqldts.com/default.aspx?231
Hope this helps you!
Greetings,
Carstensql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment