How to get only one file at a time from source which contains many files using foreach loop in SSIS


source path A contains 5 files,

I have to move one file at a time from A , rename it and put in another path B.

so 5 times i should move it and rename it.

I tried it with foreach loop container which move all 5 files and only rename one file among 5 files.

I want to take one file, rename it, put in B.

so any suggestion which will resolve my problem,

Thanks in Advance.


use foreach  loopset enumerator as file  enumeratorthen in variable mapping tab,set index 0 to FileVariable ( you should create a FileVariable in package scope datatype string )then put  a File System Task inside foreach loopyou can set source  connection as variable and set FileVariable there/

Go to

Hi RezaPlease correct me if i am wrong, did you miss the