I'm just learning 2005, so apologies in advance for the newb questions.
I am facing the following situation: Each day I have to upload an assortment of .csv files with variable names (eg. FileOneYYYYMMDD.csv, FileTwoYYYYMMDD.csv, etc.) to an FTP site, from the following directory structure:
Directory1
SubDirectoryA
SubDirectoryB
SubDirectoryC
I have accomplished this by setting up a package with three sequence containers (one for each subdirectory), each of which holds a Foreach loop (with a file enumerator configured as *.csv), each of which holds an FTP Task. This may not be the best way to do it, but it works. But if there's a better way I'd like to know!
Anyway, the wall I've run into is trying to move the .csv files to an archive directory after they've been uploaded. The wildcard variable doesn't seem to work with the File System Task, so I'm having a hard time figuring out how to move a bunch of variably named .csv files at different depths of a directory structure to an archive directory.
I've searched but can't seem to find a solution.
Why not add a file system task after the FTP task (hook them up together with a precedence constraint) to move the file after the FTP task completes?|||Nah, that sounds too easy.
On a more serious note, it seems I had to also set DelayValidation = True on the File System Task.
|||I have a similar process.
I'm grabbing csv's that contain a date in the name from an ftp site and dropping them locally in the "Processing" folder. Once the file processes completely I move the file to the "Processed" folder. If it errors then I move it to the "Error" folder and have appended to the name of the file the date & time it errored.
In addition, before I kick off this whole process I use a script component to check if a file exists either in the "Processed" or "Processing" folder before bothering to ftp it.
As far as the errored files go, since I make the name unique with the timestamp i can attempt the uploads infinite number of times.
Also, I'm using a For Look container with Package level variables so I can access the variables at any time throughout the process.
No comments:
Post a Comment