Author |
Topic |
pras2007
Posting Yak Master
216 Posts |
Posted - 2008-02-19 : 08:08:31
|
Hello All,I have DTS package that is being ran by a job every morning. The DTS package extract data and saves the result file in a text format in the local directory. My question is how can I copy or move the daily file stored in the local directory to an external directory? Please advice? Thanks. |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-02-19 : 08:26:24
|
Doe the the FileSystemObject in a DTS ActiveX script , do the job?Jack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2008-02-19 : 08:26:54
|
Sorry , I forgot to ask , does it need to be moved by FTP?Jack Vamvas--------------------Search IT jobs from multiple sources- http://www.ITjobfeed.com |
 |
|
jhocutt
Constraint Violating Yak Guru
385 Posts |
Posted - 2008-02-19 : 08:36:51
|
add a "execute Process Task" step to DTS IE a batch filecopy c:\temp\myfile.txt \\myserver\mysharedfolder\myfile.txt"God does not play dice" -- Albert Einstein"Not only does God play dice, but he sometimes throws them where they cannot be seen." -- Stephen Hawking |
 |
|
pras2007
Posting Yak Master
216 Posts |
Posted - 2008-02-19 : 08:54:27
|
Jack Vamvas, It does not matter if it is moved by a ftp or not. Thanks. |
 |
|
pras2007
Posting Yak Master
216 Posts |
Posted - 2008-02-19 : 09:06:31
|
jhocutt,How would you code know which file to copy? The saved text files are in this naming convention: datafile_20080219.txt. Thanks. |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-19 : 09:07:47
|
Based on timestamp??Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
pras2007
Posting Yak Master
216 Posts |
Posted - 2008-02-19 : 09:12:35
|
harsh_athalye,What format would that be? Thanks. |
 |
|
jhocutt
Constraint Violating Yak Guru
385 Posts |
Posted - 2008-02-19 : 09:13:08
|
I would copy all files matching a file mask datafile_[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9].txt and then archive the local copy by moving it to a sub folder."God does not play dice" -- Albert Einstein"Not only does God play dice, but he sometimes throws them where they cannot be seen." -- Stephen Hawking |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-02-19 : 09:19:14
|
or you can add ActivX Script Task in the DTS and copy the file created in local directory to external directory, based on most recent file creation date. (In case of FTP, use EXECUTE PROCESS task)Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|