flatten-nested-folder-structure

Flattening Nested Folder Structure to Single Output Watch Folder


Recently, a Document Conversion Service customer in the consulting industry reached out to the PEERNET team requesting the ability to flatten a nested folder structure existing in the input folder to a single output folder. They needed this feature so that all created PDF documents could be easily fed into the next stage of workflow. 

At the time, our current approach to managing nested folders structures was to maintain the folder structure from the input folder in the output folder. 

At PEERNET listen to the needs of our customers and recognize where requested features would be useful for all of our Document Conversion Service customers. Therefore, you can now access this flattening folder structure feature in Document Conversion Service release 3.0.019.

Note: This feature is only applicable to Document Conversion Service customers using Watch Folder Service.

Flatten Folder Structure

By default, Watch Folder Service will maintain any input folder file structure when dropping converted files in the output folder. With this added feature, you now have the option to choose to flatten the folder structure that exists in the input folder and save all creates files directly at the root of the output folder. It is important to note however, that if you choose to flatten the folder structure, the possibility of file name collisions exists, meaning that files of the same name can be created. If files of the same name are created and saved to the same folder, the more recently created file will override the older file automatically.

To enable flattening of the folder structure in the output file, set the value for OutputFolder.MaintainInputFolderStructure to false.

OutputFolder.MaintainInputFolderStructure_False

Unique File Naming

To address the issue of name collision, DCS 3.0.019 also includes the ability to automatically create unique output names using a Global Unique Identifier (GUID). A GUID is a string of alphanumeric characters in the format of 0f8fad5b-d9cb-469f-a165-70867728950e. This identifier can be added before, after, or both before and after, the original filename, and with or without the dashes. It can be separated from the original filename by a designated character, or characters. This automatic global naming includes support for clustered conversion, meaning the global naming will work if you have multiple servers running DCS, all working on the same input folder and dropping created files into the same output folder.

To enable unique file naming, set the value for either OutputFolder.PrependUniqueGUIDToFilename, or OutputFolder.AppendUniqueGUIDToFilename, or both to true.

OutputFolder.UniqueGUIDFilename-True

It’s worth noting that enabling GUID file naming is not only available if you are flattening the folder structure in the output folder. You can choose to enable this feature for any watch folder section at any time if ensuring unique file naming is of concern for you. Moreover, both the flattening feature and the GUID file naming feature are set per watch folder section. Therefore, you can choose to flatten the output folder and add GUID file naming for one watch folder section, while maintaining the folder structure and not using GUID file naming for another watch folder section.

This blog is intended to provide our users a brief overview of the new features available in Document Conversion Service release 3.0.019 and later. If you need assistance updating to the latest release of the software please see our tutorial video on Updating or Upgrading Document Conversion Service


The best way to get started with Document Conversion Service is by downloading our free 30-day trial. This is a fully functional trial of DCS Level I with a watermark added to all output files. As always, the PEERNET support team is more than happy to answer any of your questions and help you evaluate the trial.