Sometimes I find I need to find files passing through a flow based on their content.
To help with this, I grab some useful data and rename the file as it passes through the flow.
These I can use the search function in the Input and Output connector tabs.
![](https://uploads-us-west-2.insided.com/cdata-en/attachment/3aef38d6-99f2-4470-9a45-f68e86f1c97a.png)
<arc:set attr="xml.xpath" value="/" />
<arc:set attr="xml.uri" value=""Filepath]" />
<arc:call op="xmlDOMSearch" in="xml" out="result">
<!-- xpath is a context sensitive function in arcscript. If an xml document is loaded in a
search, xpath will return the name of a child relative to the search result -->
<arc:set attr="output.header:e_id" value=""xpath('/Schedule/Results/TrackingEvent/e_id')]" />
<arc:set attr="output.header:p_uuid" value=""xpath('/Schedule/Results/TrackingEvent/p_uuid')]" />
<arc:set attr="output.header:e_country_code" value=""xpath('/Schedule/Results/TrackingEvent/e_country_code')]" />
<arc:set attr="output.header:c_carrier_name" value=""xpath('/Schedule/Results/TrackingEvent/c_carrier_name')|replace(' ','')]" />
<arc:set attr="output.header:p_tracking_number" value=""xpath('/Schedule/Results/TrackingEvent/p_tracking_number')]" />
</arc:call>
<arc:set attr="output.FilePath" value=""FilePath]" />
<arc:set attr="output.filename" value=""output.header:e_id]--output.header:e_country_code]--output.header:p_tracking_number]--output.header:c_carrier_name]--output.header:p_uuid].xml" />
<arc:push item="output" />