AnsweredAssumed Answered

Identify file by contents

Question asked by stephenp on Aug 14, 2017
Latest reply on Aug 14, 2017 by James Ahlborn

Is there a way of identifying a file by its contents rather than filtering on file name?  


I have a number of incoming xml files from 3rd parties.  I can not be 100% confident on file names as for reasons outside my control they could be anything.   i can however be confident  of the file content.


in theory i should be able to check the root node of the xml and decide how to process the file.


i assume i can use some groovy to get the root node.  any other options?