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.  Directory Node FileName Output

    Employee
    Posted 06-22-2009 21:06

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

    Originally posted by: phourigan_MDS

    Hi Folks,

    This is my first post on the forum, so I'll start with an easy one.

    I have a graph which I use to correlate multiple tab separated files into a Delimited File and I filter and from there to produce select output.

    It's pretty simple. What I would like to do is include the FileName(the tail end bit) as part of the Delimited File Node output in a column.

    Here's my graph to show what I want to do, which includes pseudo code.

    I'll also attach the source files read from the Directory Node...

    Many Thanks
    --ph
    Attachments:
    ProcExplr.zip


  • 2.  RE: Directory Node FileName Output

    Employee
    Posted 06-22-2009 21:57

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

    Originally posted by: ltolleson

    Instead of using the "Delimited File" node use the "Multiple BRD Files" node to read in the data from the "Directory List" node. Then in the new node put the name of the column from the Directory List output, which is "FileName" in the Filename parameter in the node. Also supply a name for the FilenameOuputField parameter. This is the parameter to name your new field to hold the filename value.

    One more thing to mention. I tried this with your data and received an error since you have 2 blank lines at the end of each of your input file. Remove these lines and this approach will work.

    Hope that helps.


  • 3.  RE: Directory Node FileName Output

    Employee
    Posted 06-23-2009 10:10

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

    Originally posted by: phourigan_MDS

    Thanks, worked a treat!

    I'll have to parse out the 2 * \\n from the files before I pump them into the multiple BRD node as these files are saved by another application and there could be potentially heaps of them.

    I was thinking, Directory Node > BRD File > Filter (Remove \\n) > Output > then to our Directory Node > Multiple BRD.... etc.

    Will give it a try later today and let you know how it goes.

    thanks for your time.
    --ph