locked
Files exists check in the folder using ssis RRS feed

  • Question

  • Hi All,

    I have a requirement like I have a shared folder where the customer user to keep a group of Pdf files.Now I have to create a package such that if any file doesn't exist,then I should able to send a mail to customer that particular file doesnt exist and rest all the other files should go with attchement to customer.Kindly help me out of this.

    Regards,


    sudha

    Wednesday, May 29, 2013 5:18 AM

Answers

All replies

  • The easiest is probably to use a Script Task with some .Net  code like:
    string[ ] files = Directory.GetFiles ( Dts.Variables["user::folderpath"].Value.ToString(), "*.pdf", SearchOption.AllDirectories ); 

    But do you have any .Net experience?

    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    • Proposed as answer by Nitesh Rai Wednesday, May 29, 2013 7:53 AM
    Wednesday, May 29, 2013 5:33 AM
  • Hi,

    I am not aware of .Net.I would like to do using SSIS.


    sudha

    Wednesday, May 29, 2013 6:23 AM
  • It's the SSIS Script Task (part of the Control Flow)... but with some .Net code to do things that are hard to do with the out of the box SSIS tasks.

    You could try something with a Custom Task like file property task. It has an if-exists check in it: http://filepropertiestask.codeplex.com/


    Please mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter

    • Proposed as answer by Mike Yin Monday, June 3, 2013 1:41 AM
    • Marked as answer by Mike Yin Sunday, June 9, 2013 4:17 PM
    Wednesday, May 29, 2013 6:40 AM