SSIS 2015 - what is the best way to create ssis task to delete only *.csv files from remote directory

  • SSIS 2015 - what is the best way to create ssis task to delete only *.csv files from remote directory. I thought to use system file task with delete file content. But I cannot able to give *.csv variable. Please advise asap.

  • saptek9 - Friday, May 18, 2018 4:15 PM

    SSIS 2015 - what is the best way to create ssis task to delete only *.csv files from remote directory. I thought to use system file task with delete file content. But I cannot able to give *.csv variable. Please advise asap.

    The easiest way is to use a Script Task. Your C# would look something like this (untested):

    foreach (string f in Directory.EnumerateFiles(remoteDirectory,"*.csv"))
    {  File.Delete(f);}

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • thank you

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

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