Link to home
Start Free TrialLog in
Avatar of Niall Gallagher
Niall GallagherFlag for Ireland

asked on

Get name of FILE without date

Hi Experts,
I am building a SSIS which will look for 2 files which will have <filename>Month year.xls.
I want to build the SSIS so it is fully automated I have everything working except I can't figure out how to either just look at the first 10 letters of the file name or ?? maybe there's a better way

Any help is much appreciated.
I am trying to do this with a Data Flow Task in case there is another way
Avatar of Brian Crowe
Brian Crowe
Flag of United States of America image

Instead of just looking at the first part of the filename use variables to construct the filename including the repeatable portion.

If you can provide some examples I can help you work out the expression.

Here is an example:

http://www.sqlmatters.com/Articles/Including%20the%20Date%20in%20a%20Filename%20in%20SSIS%20using%20an%20Expression.aspx
Avatar of Niall Gallagher

ASKER

Thanks for your help and I will read the page you sent the link for.
but an example of the file name is "Contract_April.xls" and the other is worse (I think) "Agent - April 2015.xls"
ASKER CERTIFIED SOLUTION
Avatar of Brian Crowe
Brian Crowe
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for your help again. It looks easy when you know the answer.