Alteryx Designer Desktop Discussions

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

How to check if a specific folder exists or not?

jpscoralick
8 - Asteroid

Hello everyone!

 

Every month I must read a bunch of files from a directory which has subfolders named as month's numbers (01 to 12). In order to read different months, I use a numeric constant.


The main issue here is that each folder is created during its month, for example: on February, the directory already has the folder of January (01), and the folder of February (02) will be eventually created during the month (and, for now, the remaining months don't have its folders).

 

Therefore, I'd like to check inside the directory if a folder exists or not. Is it possible?

I mean, I know that Directory Tool would generate an error if the folder doesn't exists, but I'm trying to catch the error (maybe with Message Tool) and handle it in a way that does not interrupt the workflow execution (like the error from Directory Tool does).

 

Can someone help me?

Thanks in advance.

11 REPLIES 11
jpscoralick
8 - Asteroid

Hey @FrederikE!
Your suggestion led me to an alternative solution. Thanks a lot!

Piyali417
5 - Atom

Hi, @jpscoralick, can you please let me know how did you solve this issue, even I have the same query. can you please give me sample workflow.

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