Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS + dynamic txt file + Batch file + FTP

Author  Topic 

detzey
Starting Member

2 Posts

Posted - 2007-02-04 : 21:28:46
Hello, I hope somebody can help me !!

I've created a DTS that connects to a remote database, runs a select query then runs an ActionscriptX to write a txt file named with the current date and time, filled with the data return from a global variable which was defiened in the Execute SQL task.

The problem is that I have to upload this file to through FTP calling a bat file, but the name is generated dynamically so I have to send the name of the file as a parameter, but I don't know how!!
Can anyone help me with this?

nr
SQLTeam MVY

12543 Posts

Posted - 2007-02-05 : 04:32:37
You mean you want to use a parameter in the .bat file call or to create the .bat file in the package using the filename and then call it?
And which bit are you stuck on?


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

detzey
Starting Member

2 Posts

Posted - 2007-02-06 : 09:06:03
Thanks for replying my post. I was sutck on the part had to send the name of the file (which changes every time the DTS runs) to the batch file, so it could ftp this file.
I found a solution, I wrote a code to generate the batch file (because the name of this file is always the same) and write all the ftp commands in a txt file including the name of data file which is dynamically generated based on date and time. and create a execute process task to call the batch file.
Now it's working fine.
Thanks for trying to help me!

quote:
Originally posted by nr

You mean you want to use a parameter in the .bat file call or to create the .bat file in the package using the filename and then call it?
And which bit are you stuck on?


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.

Go to Top of Page
   

- Advertisement -