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.
| Author |
Topic |
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2009-11-25 : 10:06:55
|
| Hey Guys,I have a SSIS Package that uses filename as the input parameter and stages the file...SSIS runs fine now what I need to do is Create a package that will load the Old files one by one using the package that I talked about... name of the files have date appended to it and the rest of the string remains the same... Guys any idea what is the best approach to do this? Thanks for taking time and help. |
|
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2009-11-25 : 12:06:21
|
| use a for loop (for each file name in dir) in DOS with dtsexec would let you do this. The idea is to create a for loop with DOS, for each file in directory x, then pass the filename to dtsexec yourpackage -filenameMike"oh, that monkey is going to pay" |
 |
|
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2009-11-25 : 14:01:29
|
| There is one issue though... They are historical files and each days files are in folders named as YYYYMMDD and the issue is somedays the files are Zipped while other days the files are not zipped and are .txt format.... I guess I need to create 2 for Each loop (to transverse through subfolders as well) for .txt and .gz files and execute my Staging SSIS Package using dtsexec.... What do you suggest? |
 |
|
|
|
|
|