Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

The filenames not being read properly

Jaspreet
6 - Meteoroid

Hi,

 

I am reading a list of filenames from a directory (basically, sub-directories) and somehow an additional ".csv" gets appended to filename in end, when Dynamic Input tool reads it. How do I alleviate this issue?

 

Here is the error description:

 

Designer x64 Started running C:\Users\jkaur12\Contract Renewal\test flow 1.yxmd at 08/14/2018 15:51:10
Directory (2) 95 records were generated
Dynamic Input (7) File not found "Y:\BI data dump\June 2017\Adhoc JK - Business MRR KEL-CGY-EDM-FTM - 160430.csv.csv"
Dynamic Input (7) The file "Y:\BI data dump\June 2017\Adhoc JK - Business MRR KEL-CGY-EDM-FTM - 160430.csv.csv" has a different number of fields than the 1st file in the set and will be skipped
Dynamic Input (7) 0 records were read from 2 files/queries
Designer x64 Finished running test flow 1.yxmd in 1.2 seconds with 1 error and 1 warning

2 REPLIES 2
BenMoss
ACE Emeritus
ACE Emeritus

Hi @Jaspreet,

 

I took a look at your workflow. It looks like your formula to remove the .csv suffix from the filename after the directory input has been set up incorrectly.

 

You are using the statement...

 

TrimLeft([FileName],".csv")

In fact it should be...

 

TrimRight([FileName],".csv")

Alternatively I would actually advise you just keep the full path field as is and don't overwrite it with the filename, then use the 'Change Entire File Path' option.

 

Ben

Jaspreet
6 - Meteoroid

Thanks BenMoss! Works beautifully now.

Labels