Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Expressions based on file name. Finding the . Extention and just the file name without the extention

$
0
0

I use the following expression to grab the full file name from full directory

REVERSE(SUBSTRING( REVERSE( @[User::HotFoldersDownloadFullFilePath]  ), 1, FINDSTRING( REVERSE( @[User::HotFoldersDownloadFullFilePath]  ), "\\", 1 ) -1 )  )

It finds the last \\ and gives you everything after this test123.csv

But what im wanting from above is the dot and everything after. .csv Ive tried the below but it gives me the extention without the dot

REVERSE(SUBSTRING( REVERSE( @[User::HotFoldersDownloadFullFilePath]  ), 1, FINDSTRING( REVERSE( @[User::HotFoldersDownloadFullFilePath]  ), ".", 1 ) -1 )  )

And then I want the file name without the dot and extention. "test123"

I have no idea how to do this. THis is because I want to add a date variable at the end of the file name before the . extention.

And then maybe I can use this to create a new file name? (Hopefully)

Debbie


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>