October 31, 2012 at 9:28 am
Hi,
I have a task , in which I need to move a file from a Network drive to another location( local drive).
File name pattern (Number+date).
1)Need only number from filename.
But trick is I have files which starts with same Number but date different , first time when I move it to the local,it should create folder.
For the second time it should just move it, should not create any folder.
Can anyone tell me how to do it?
Thanks,
komal
October 31, 2012 at 9:35 am
A very simple Script Task could check whether the folder exists and if not, create it.
Then do your file copy.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
October 31, 2012 at 9:39 am
Is there any other way ...other tahn going with script task???
October 31, 2012 at 10:13 am
Not that I've tried, but it looks like this will work:
1) Create a File System Task.
2) Change Operation to 'Create directory'
3) Change Use Directory If Exists to true.
4) Set the Source Connection to be the path to the folder to be created if not exists.
(Note: this is from SSIS 2012, not sure about earlier versions)
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply