Alteryx Designer Desktop Discussions

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

Create field from file name using directory input

BrianHausman
6 - Meteoroid

I have reports auto generated and placed on a shared drive that I am bringing into a workflow using the directory tool.  Each file name has a date the file was created however the date is not available on any sheet.  Using the Input Data tool I can choose to Output File Name as Field.  However I cant seem to do this when using the directory input,  Googling and searching the community has not worked so far.  Is this possible?  If not what would be the best way to accomplish this?  I will have daily files for a six month project that needs to be updated daily.  Thanks

4 REPLIES 4
BrandonB
Alteryx
Alteryx

The Directory Tool already outputs the file name as a field without any configuration. https://help.alteryx.com/current/en/designer/tools/in-out-tools/directory-tool.html 

 

FullPath

V_WString

The entire path of the file. This includes the drive, directory, and file name.

FileName

V_WString

The name of the file.

BrianHausman
6 - Meteoroid

Ok I see where that is outputted, however it is not creating a field in my data sets.  In my example I need each file to be modified with the file name as a field so I can then alter that field to show the date the data was from.

 

I tried to do it as shown below but it does not add the file name.

 

 

 

alexnajm
17 - Castor
17 - Castor

@BrianHausman in your Dynamic Input template config, do you have "Output File Name as a Field' selected? For .xlsx files, it's typically option #5

caltang
17 - Castor
17 - Castor

Alternatively, if you want to go down the batch macro route instead of dynamic input, you can configure your dummy data set as part of your batch macro to output the file name or full path. From there you can get it as a field in your macro output. 

 

More information here:

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Input-Batch-Macro-AKA-the-Extr...

https://knowledge.alteryx.com/index/s/article/The-Ultimate-Input-Data-Flowchart-1583459854309 

Calvin Tang
Alteryx ACE
https://www.linkedin.com/in/calvintangkw/
Labels