We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Alteryx Directory Tool to List Folders Ending with Specific Pattern

KamenRider
11 - Bolide

Hi Alteryx Community,

 

I'm currently working on a project where I need to list all folders within a specific directory that end with the pattern "LBSock_Mumbo_PRM3_ModelY". I've been trying to configure the Directory tool to achieve this, but so far, it keeps on running. I have this drive with 911 folders and all I need is to capture the folder that end in "LBSock_Mumbo_PRM3_ModelY". Can you show how I can achieve this?

 

Thanks and hope to hear from anyone,

Kamen

7 REPLIES 7
OTrieger
14 - Magnetar

@KamenRider 

I'm not aware that Alteryx has this functionality. I'm sure that you can find how to do it using Python tool or you be able to use Command Tool generate the list of folders and then you can input that list and filter based on your keywords.

KamenRider
11 - Bolide

Hi @OTrieger 

 

Is this not possible? Thanks for your reply. Would you show me how to do it in python or command tool or macro maybe where after finding the folder I can list its contents?

 

Looking forward for your response.

Kamen

OTrieger
14 - Magnetar

@KamenRider 

It is possible, however it will be complex as you will need to pull in at least one file in each of the folders to have the path. So theoretically it is possible, practically I do not think so.

 

The bellow link will be a good starting point on how to do it with Command Tool.

 

https://www.google.com/search?q=how+to+get+all+the+folder+names+in+one+directory&rlz=1C1SLLM_enGB115... 

alexnajm
18 - Pollux
18 - Pollux

Can you show us your config @KamenRider ? I would imagine it can work with a Directory (include subdirectories) and a Filter (with the EndsWith function)

caltang
17 - Castor
17 - Castor

As what @alexnajm said, rather than configuring directly on the Directory tool, you can call the directory + sub directory, then add a filter tool with the expression "EndsWith" or even more functional expressions to get what you desire. Then you can use a dynamic input or batch macro to call said files' content if you'd like.

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
KamenRider
11 - Bolide

Hi @alexnajm @caltang 

 

What configuration you would like to see? Can you give me some example. Or maybe below example might help. As I said when I run the worklow, it is just keeps on running.I presume maybe because i have 911 folders which take it very slow to process. Please advise and help how I can solve this.

 

configuration.PNG

 

runing.PNG

 

Kamen

alexnajm
18 - Pollux
18 - Pollux

You can't specify a folder name in the File Specification part - you would just specify the main folder in the Directory part, include subdirectories, and Filter to where the directory ENDSWITH LBSock_Mumbo_PRM3_ModelY. It may take a lo time if it's going through 911 folders, so try testing it with one directory and then expand from there

 

No workflow necessary from our end, as we don't have access to your directories. Good luck!

Labels
Top Solution Authors