(SSIS 2012) - Directory.GetFiles --- How to Not Show Numeric Count Beside Each File

  • I'm using SSIS 2012 to create a comprehensive ETL package for a client to do a bunch of processing of incoming Excel files from clients of theirs.

    One part of the SSIS package is that I run the following to get a list of all files found within numerous subfolders to show in an email to the client:

    dim sFilesFound() as string = Directory.GetFiles("c:\ExcelFilesFound\","*.*",SearchOption.AllDirectories)

    The list of files returned is great, as it returns the full paths in all subfolders along with the file names. It does, however, include a running count of the files and this is something I really don't want if I can get around it. This is from memory, but it's something like this as far as what sFilesFound ends up containing:

    (01): "c:\ExcelFilesFound\Folder1\Test.txt"

    (02): "c:\ExcelFilesFound\Folder1\AnotherText.txt"

    (03): "c:\ExcelFilesFound\Folder2\Hello.txt"

    etc...

    I'd really just prefer to see:

    "c:\ExcelFilesFound\Folder1\Test.txt"

    "c:\ExcelFilesFound\Folder1\AnotherText.txt"

    "c:\ExcelFilesFound\Folder2\Hello.txt"

    etc...

    ... instead of the numeric counts also shown at the beginning of each line showing each file path/name.

    Any suggestions here?

    Many thanks in advance for any tips any of you may have.

  • According to the examples here[/url], that number is not included. Can you post the code fragment that creates the output?

    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

  • Oh I bet that's the deal. I just ran it in the immediate window and didn't wait to actually see what ended up being inserted into the email. I bet as you are suggesting, the list of files in the email WON'T have the counter at the beginning of each file

    Thanks very much!

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

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