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.

Input Filename Changes with Date

BrentO
5 - Atom

I am trying to import a file whose name is changed daily with the date as part of the filename.  How can I tell Alteryx to look for a filename with today's date in it?

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @BrentO 

 

The method would be to use dynamic input tool.

 

This post by @HomesickSurfer is nearly to the point.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Processing-Single-Excel-with-Multiple-...

 

Hope this helps : )

atcodedog05
22 - Nova
22 - Nova

Hi @BrentO 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1628265648713.png

 

1. Using directory tool to point to the folder and read filenames of all the files.

2. Using select tool to keep only filename and filepath.

3. Using filter to keep the filename which has today's date.

4. Using formula tool to create full path with sheet name specified.

5. Using dynamic input tool the specific file.

 

Interactive lesson on dynamic tool : https://community.alteryx.com/t5/Interactive-Lessons/Connecting-to-Multiple-Sheets-at-Once/ta-p/8287...

 

Hope this helps : )

HomesickSurfer
12 - Quasar

@atcodedog05 , thx for the mention.

 

@BrentO , use the provided example and filter files with Contains([FileName],DateTimeToday()), assuming that your files contain date with yyyy-mm-dd format.  If not, please advise and provide sample filenames.

Maskell_Rascal
13 - Pulsar

@BrentO - Let me offer up one more solution for dynamically bringing in the latest file created. 

 

Maskell_Rascal_0-1628270633362.png

 

This method will work regardless of whether the date is in the filename or not. 

 

Cheers!

Phil

 

Paresh1pandya
7 - Meteor

What will be the configuration for Dynamic Input tool ? Can you please share sample workflow

HomesickSurfer
12 - Quasar

Hi @Maskell_Rascal  I have encountered times when the creation date isn't always reliable due to file restore or files being created over long weekends at the same time, both bearing same date, hence going with the filename date approach (if a date exists in the filename.

Labels