Substring dynamic filename | Community
Skip to main content
Level 3
Jun 26, 2020 3:01 PM UTC
Solved

Substring dynamic filename

Hi there,

 

I'm trying to create dynamic audience label using the filename from file downloaded from SFTP. However the filename came up as full path. How can I substring $(vars/@filename) to leave just the filename removing the path and file extension?

 

Thanks in advance

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
DavidKangni
DavidKangniAccepted solution
New Participant
Jun 29, 2020 4:03 AM UTC

Hi Michelle,

 

You can try a formula like this Substring(Filename($(vars/@filename)),1,Length(Filename($(vars/@filename)))-23)

David Kangni

3 replies

DavidKangni
DavidKangniAccepted solution
New Participant
Jun 29, 2020 4:03 AM UTC

Hi Michelle,

 

You can try a formula like this Substring(Filename($(vars/@filename)),1,Length(Filename($(vars/@filename)))-23)

Translate
David Kangni
Level 3
Jun 29, 2020 12:59 PM UTC
It works. Thanks so much!
Translate