Extract file path and name from "Input File" node?

I’m using an “Input File” node to read in a FASTA (text) file for a sequence alignment node, and now I have found that I also need to read the file using a different node (“Load Text Files”, followed by “FASTA Sequence Extractor”) at a different point in my workflow. Therefore I’m looking to extract the file path and name from “Input File” so I can pass it on as a variable to “Load Text Files”. I can’t seem to find a way to do this though as “Input File” does not create any flow variables from the specified input file.
However if I look at “Model Content” - under the output from Input File - I do see “Model Content” -> “child-0” -> “uri [xstring] ->” which starts with “file:/” and has the path and name of the file I specified. Is there a way I can extract this to a flow variable?

thank you!

I found my own answer to this. Follow “Input File” with “Port to URI”, then do a couple manipulations of that output (“Cell Splitter” and “String Replacer” in my case) and “Table Column to Variable”.

This seems like it would also be doable using “URI Port to Variable” as well, though I haven’t tried it extensively. If there is an advantage to one way over the other (or a “better” way between the two) I’m interested in knowing that.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.