0

thank you in advance.

I am new to ssis and i need some help. i have to create a package wherein, i have to a pick up dynamically changing .csv files from different folders and load them to SQL table, after the files are loaded into the SQL table i need the files to be placed back into the folder they were picked up from.

i did a part of this by referring to this link: How do I move files to an archive folder after the files have been processed?.

i was able to load all the files into one folder but i need to put back the files into different folders after they are loaded. This is the File structure i have

D:\SAFI\2016_04||

file1.csv||

File2.csv||

File3.csv||

D:\SAFI\2016_05||

File1.csv||

File2.csv||

File3.csv||

I need the files to be loaded into the archive folder,but in the same manner.

exmaple:

D:\Archive\2016_04||

File1.csv||

File2.csv||

File3.csv||

D:\Archive\2016_05||

File1.csv||

File2.csv||

File3.csv||

it should create the folder itself and load the files accordingly.

Any help is appreciated.

Thank you once again.

Community
  • 1
  • 1
Looking_for_answers
  • 343
  • 1
  • 6
  • 20

2 Answers2

1

use file system task with copy directory option

set source connection and target connection using variable

0

need to use variables for folderpath, file name, directory name. use execute SQL task

Looking_for_answers
  • 343
  • 1
  • 6
  • 20