LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Concatenating multiple files

    Employee
    Posted 06-11-2008 11:30

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: roeperg

    Hi

    I have a directory with 20 or so identically formatted files which I want to combine into one file for processing. I used the directory node to get a list of the names, but I am stumped from there. What is the best way to take the names and use them to build a single file? I could script something in the shell but I wanted to keep everything in the graph if possible.

    Greg


  • 2.  RE: Concatenating multiple files

    Employee
    Posted 06-11-2008 11:50

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: johnpelz

    Most of our Input nodes support this functionality (multiple file input) out of the box. I believe the only one that does not is the Fixed Format File node but even in that case, we have a client version of the node that was enhanced to support it.

    Anyways, let's assume the format is delimited. Simply run the output pin of the Directory List node into the input pin of the Delimited node and set the "FilenameExpr" parameter on the Delimited node to column name of the directory list output, which is FileName by default.

    This will now cause the delimited node to process EACH file from the directory list.
    See attached example.

    Hope this helps.
    Attachments:
    Multiple_File_Example.zip


  • 3.  RE: Concatenating multiple files

    Employee
    Posted 06-11-2008 13:44

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: roeperg

    That was perfect, thanks!

    I was trying filename expressions like "{{^DataDirectory^}}/*.dat", the correct way is so much simpler.


  • 4.  RE: Concatenating multiple files

    Employee
    Posted 06-11-2008 13:45

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: roeperg

    That was perfect, thanks!

    I was trying filename expressions like "{{^DataDirectory^}}/*.dat", the correct way is so much simpler.