Load and count only those Flat files which filename contain %vendor%.

  • Hi ,

    I want to load and count only those Flat files which filename contain %vendor%.

    like

    abc_vendorpic.csv

    Hist_vendor_20150825.csv

    public void Main()

    {

    string TheSource = Dts.Variables["$Package::VendorItem_FilePath"].Value.ToString();

    string[] files = Directory.GetFiles(TheSource, "VENDOR*.csv", System.IO.SearchOption.TopDirectoryOnly);

    Dts.Variables["User::V_Filecount"].Value= files.Length;

    }

    and same file should load in for each loop container.

    what to change in above code .

  • Hi

    Hmm, won't be easier if you simply set *vendor*.csv in Enumerator configuration section

    for Foreach File Enumerator?

    Bet regards

    Mike

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply