Free Trial

Alteryx Designer Desktop Discussions

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

Multiple .txt files in a directory with different delimiters (per .txt file)

aetingu33
5 - Atom

Dear all,

 

I have been reading the forums but haven't found the solution that solves my issue.  It sounds simple, but I might be over thinking it.  Here is the problem.

 

I have a list of paths of .txt files which I am passing on to my dynamic input tool to read and aggregate the data.  The issue is that of the 24 .txt files, half has "tab \t" delimiter, the other half had "~" as delimiter.  The 50-50 is random, so can't group them and split the dynamic input.  The next input file could be one or the other.

 

How do I go about solving this.  I tried applying no delimiters \0 but it doesn't work, I lose files or some reason.

 

Any help is appreciated.

 

Thanks,

Aksel

3 REPLIES 3
VickyA
6 - Meteoroid

Have you tried reading them with no delimiters first and not taking first row as headers. 

Then use a formula tool to replace both delimiters into a common delimiter.

VickyA
6 - Meteoroid

What I mean by no delimiters is remove the \0 from the Delimiter option and leave it blank.

VickyA_0-1651755189602.png

 

aetingu33
5 - Atom

Thank you,  for some reason I was over complicating it.

Removed the delimiters, Replaced the delimiter '~' with tab delimiter, applied text to columns and then added back the header.  Perfect!

 

Thanks a million.

Labels
Top Solution Authors