Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Extract Folder Name and Date

KamenRider
11 - Bolide

Hi,

 

Can I ask for your assistance in extracting the folder name from a directory as well as the date? The directory are as follows:

 


\\po-nas4.xyzcompany.net\pib_mkts_00001_prd_335$\.seb\bus\khf\SNARL\hf3\input\DB LockPAWNLevel\8029-5542364859.20240912.SBLock_Mumbo_SECD_MODELX\

 

a. I would like to get the folder name "8029-5542364859.20240912.SBLock_Mumbo_SECD_MODELX"

b. extract the date 20240912 and covert it to date type 2024-09-12.

 

Thanks and looking forward for response.

 

Kamen

6 REPLIES 6
cpet13
11 - Bolide

@KamenRider this sounds like the RegEx tool would be an ideal candidate. The Advanced Certification learning path has a section all about the RegEx tool and would help you figure out the formula to use.

Razb
7 - Meteor

Hi @KamenRider 

 

@cpet13 is right, the key functionallity for the solution here is regEx. 

 

Attached a sample workflow with the solution as you described. 

 

Let me know if it works for you 🙂

OTrieger
12 - Quasar

There are several ways how to get it done, you can do it with REGEX in formula tool or without REGEX in formula tool, or with REXGEX Parse tool or Text To Columns Parse tool.

OTrieger
12 - Quasar

While REGEX will work well here I think that there is a better way here to get what you want than with REGEX. With a simple formula tool you need to reverse the text flow, find the first position of the \ then use Left and use the position -1 and then reverse your text and you got the Folder name.

binuacs
21 - Polaris

@KamenRider one way of doing this

image.png

KamenRider
11 - Bolide

Thank @Razb  and @binuacs . I know REGEX is the solution to this case however, I really have a hard time learning from it. Thank you for your solutions.

 

Kamen

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels