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
Solved! Go to Solution.
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.
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
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.
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)
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.
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.
Kamen
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!