Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Determine if directory has a file > Determine if file is empty > Send out email

sbagley
5 - Atom

I'm brand new to Alteryx, and trying to learn. I've researched several options, but none seem to be doing exactly what I'm trying to do. Basically, we have four "error directories" set up to receive excel files from vendors once a day if there was an issue the previous day. The emails will come in if there was an issue, or if there was no business done the previous day we'll receive an excel file (also in the error directory.) We don't have any notification system set up currently to let us know if a file comes in, so I'm trying to automate the process. It's simple enough if it's sending an email whenever a new file comes in. However, we need to send a different email based on whether the file is empty, or if there is data present (it doesn't matter what the data is, any data present sends the same email.) 

 

What is the best way to determine daily if a folder has a new file in it or not, and if a new file is present, to do different actions based on whether data is present in the file? 

 

There's four directories I need to do this for, but I'm assuming the general process will be the same for them.

 

Thanks for your help!

3 REPLIES 3
afv2688
16 - Nebula
16 - Nebula

Hello @sbagley,

 

With the directory tool you can read the different folders and check if they are empty. The record tool would give you the amount of files in the directory.

 

For getting the file and checking if the information is valid (or if it is empty), you could use a dynamic input (right after the directory tool) and then check again with the same logic to see if the file is empty.

 

Would you like me to set you an example?

 

Regards

sbagley
5 - Atom

@

 

An example would be awesome!

 

Also, the "empty" files still come in with all the field headers, just without any record data. Would this still be considered empty?

afv2688
16 - Nebula
16 - Nebula

Hello @sbagley,

 

Answering your question yes, the file would be considered to be empty. Sin título.png

 

This example only shows it with one directory. You can easily replicate it to be four, no problem. Also if the headers doesn't match the file won't pass through the dynamic input.

 

Hope this helps

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Labels