Upgrading Server to version 22.1? We’ve enabled the faster AMP engine by default. Read about how these system settings changes might affect you.

2022-05-24 Updates: Login: If you are facing issues with logging in, please try clearing all your cookies or trying another browser. We have a fix being deployed on the evening of 5/25. Email: If you're not seeing emails be delivered from the Community, please check your spam and mark the Community emails as not junk. Thank you for your patience.

Alteryx Designer Discussions

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

Input data from all files in a directory except the most recently created - Alteryx logs

JoshMcG
5 - Atom

Hello,

 

Very new to Aleryx (2 weeks use), I have created a workflow to parse and re-arrange the data from an Alteryx log file and have all the outputs where I want them to be using a single file. Now however when I change the input path to include all the log files in the folder (Alteryx_Log_*.log) I get an error when I run the workflow as Alteryx creates a new log file in that directory and as it is 'open' it cant be read.

 

My question is: Can I input the data from all the files in a directory but exclude this newly created log file? Maybe by excluding the most recently created file?

 

I have tried using a dynamic input and a macro but my skill level is not sufficient to know if these are suitable.

 

Any help would be appreciated,

 

Josh

2 REPLIES 2
GrahamL
8 - Asteroid

Hi Josh

 

You could use a Directory tool to get all files from the log directory and then a Sort tool to sort by date created. Then add a Sample tool to exclude the first/last one and feed that into your dynamic input.

 

Let me know if this makes sense or it it doesn't meet your requirements.

 

Cheers

 

G

 

JoshMcG
5 - Atom

Thanks @ I tried that before but then tried it again after your post and it worked!

 

Thanks for the assist,

 

Josh

Labels