ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Detecting the correct input file when file names change

Jake5
アステロイド

Hello,

 

I have a workflow where ideally the user places two input files into one folder, with each file following the naming convention of R00846_WMMYYAM.txt with "MM" being the month and "YY" the year .  One of the inputs represents data for the prior period (e.g. R00846_0723AM.txt) and the other for the current period (e.g. R00846_0823AM.txt).  In Alteryx, I have an input tool for each (prior period and current period).  Is there a way to have Alteryx work off the MMYY value in order to determine which file to associate with which input? 

 

Thanks.    

4件の返信4
binu_acs
ポラリス

@Jake5 Use the directory tool read all the input files and filter out the file names which dont fall on last month

image.png

rzdodson
クエーサー

@Jake5 definitely a couple of ways to tackle this one. Assuming the nomenclature is always the same for the file names and are saved in sequence (re: current file, previous period, 2x previous periods ago, etc.), you can have a Directory tool bring in the file names, grab the two most recent files, and then bring in that data to separate streams entirely.

 

Solution.png

 

Inside the macro

 

Settings change.png

 

 

akvsachin
アステロイド

Hey @binu_acs 
Can we do this while using FileBrowse & Action Tools ?

 

binu_acs
ポラリス

@akvsachinyes,  you need to connect with folder Browser tool then connect with action tool

image.png

ラベル
トップのソリューション投稿者