Skip to main content
Level 3
June 26, 2020
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
Adobe Champion and Community Advisor
June 29, 2020

Hi Michelle,

 

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

David Kangni

3 replies

DavidKangni
Adobe Champion and Community Advisor
DavidKangniAdobe Champion and Community AdvisorAccepted solution
Adobe Champion and Community Advisor
June 29, 2020

Hi Michelle,

 

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

Translate
David Kangni
Level 3
June 29, 2020
It works. Thanks so much!
Translate