How to output each subfolder results independently?

Hi CP folks,

I thought that I since it is possible to process all subfolders with the LoadImages module that I could save each folder’s CSV results to their respective input subfolder. It appears to me that all subfolder results are merged into one csv file. Can I configure the ExportToSpreadsheet module to save each subfolders output independently when images in multiple folders are processed as one large batch?

Hi Derek,

You would need to configure LoadImages to extract metadata from the subfolder name. From “Extract metadata from where?”, select “Path” and enter the following:.*\\/](?P<SubFolder>.*)$ This serves to grab the sub-folder name for each image set and stores it as a metadata tag called “SubFolder”.

Then, in ExportToSpreadsheet, select the data to export, and uncheck the “Use the object name for the file name?” box. In the box that appears, right-click at the beginning of the file name and you should see a drop-down which contains the tag “SubFolder”. Select this tag and it will appear in green in the location in the filename where you clicked. What this will do is assemble the results on a per-subfolder basis and write them out to a spreadsheet you defined with the sub-folder metadata. All images with the same sub-folder name (i.e., contained in the same sub-folder) will be placed together in the same file.


The suggestion you provided allowed me to output data grouped by folder name. Thank you Mark.