Remote flat file ignore date/time in variable

  • Good morning experts.

    I have a file that I must copy each morning. The date and time is part of the file name.

    Today it looked like this:

    20101217_000215_<this part is always the same>.csv

    I have a file system task that is set to move but I don't know how to create a variable that only matches the second part of the file name. Sometimes it arrives before midnight and sometimes after, so the date and time should be ignored.

    Can such an expression be created?

    Thanks for reading.

    Howard

  • It looks like it is not possible using the file system task. I'm going to make a step that does it through command line.

  • You could also do it in the script task, using DirectoryInfo and FileInfo (VB.NET). With DirectoryInfo you can use wildcards when you search for files, so that should solve your problem.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

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

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