Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Automatic Pick Input File from a Folder

wenjuanchen
8 - Asteroid

Read File Name Intelligently 

Morning everybody, I have the following scenario:

Each month there is a new input data file coming in for my workflow with a different timestamp (e.g. XYZfile_20171231, XYZfile_20180131, etc.). I want Alteryx to pick up the file with the latest timestamp to run the workflow. 

I checked dynamic input, but does not look very positive.

Any suggestions?

Thank you so much.

11 REPLIES 11
cmcclellan
13 - Pulsar

Hi Wen,

 

This is how I did it ... 

 

- Directory tool (to get all files in the same directory, you can also filter by file type)

- Sort tool - CreationTime descending

- Sample tool - First 1 record (you now have the latest file in the directory)

- Dynamic Input tool - Read a list of Data Sources from FullPath, action is Change Entire File Path

 

You also have to set the template in Dynamic Input, but it should work fine

 

:)

wenjuanchen
8 - Asteroid

Thank you Chris! Great to see you in Alteryx Community!

cmcclellan
13 - Pulsar

And you too :)

Moussandzo
5 - Atom

Hello,

 

Thank you for your solution concerning "Read File Name in folder intelligently"

:)

 

Best regards

Paterne

 

Manjari
8 - Asteroid

Hi @cmcclellan

 

I followed the exact steps, I am getting an error in the dynamic input tool. 

The error is: "Unable to open archive for unzipping: full file path"

 

Requesting if you could help me this. 

secraven5
5 - Atom

Hi All. Thank you for the post and answer! This is exactly what I need. 

 

However, when I add the sample tool, I only get options for rows not records. So when I run this I get the first row of one of the docs, not the entire most recent doc with which to run the workflow (without the older docs in the same folder). 

 

Using Directory tool, I added the folder from our network, file specification '.xlsx'. Then I added the Sort tool, creationtime descending. When I add the Sample tool I get only First N Rows, Last N rows, etc. No record option and no obvious way to change settings to get it. 

 

What am I doing wrong? I appreciate it very much if anyone has the answer. Alteryx Help shows this both ways, but never addresses why one would get rows vs. records. 

 

-Elliot

secraven5
5 - Atom

Hi Manjari,

 

Is the folder you reference compressed/zipped, or is there a zipped folder within the target folder? I would try either unzipping first or removing a zipped folder form the target and see if it works. 

 

Hope this helps.

 

-Elliot

secraven5
5 - Atom

Solved with an assist from a colleague. In addition to the above, I needed to follow with the Dynamic Input tool. The Sample Tool, row vs. record, wasn't the issue after all. 

 

Settings for the Dynamic Input tool in case it helps anyone w/ a similar issue:

 

Input Data Source Template: same path as Directory input, including core of file name and asterisk in place of date stamp ('filename_*' in place of 'filename_20190306')

 

Select 'Read a list of data sources'

 

Field:  FullPath

Action:  Change Entire File Path

CalDowd98
8 - Asteroid

Hi

This works great for me when i have an excel file, but im trying to read a csv that has ; as a delimiter.  It wont work unfortunately, is there anyway around this ?

 

Thank you !

Labels