Document Conversion Service box shot

Configure Watch Folder Service to Monitor Multiple Folders


The Need

Let’s say you would like to monitor 2 Input folders (ie: Sales and Purchases) and create different types of files depending on which Input folder the file came from (ie: a file from Sales Input folder is converted to a Greyscale TIFF file and a file from Purchases Input folder is converted to a Black and White TIFF file). You also do not want the original file extension to be part of the new filename. (ie: sales1.pdf —> sales1.tif)

The Solution

Use the Watch Folder service that is included with Document Conversion Service which can be configured to monitor multiple Input folders and apply different conversion settings depending on the Input folder.


So how can this be done? Let’s take a look.

Steps:

  1. Open the Watch Folder configuration file. (Click StartAll ProgramsPEERNET Document Conversion Service 2.0Watch FolderConfigure Watch Folder Settings).
  2. Scroll down to the WatchFolder section; enter the folder paths for Sales and modify the Output file options section to create the file you want (ie Greyscale TIFF file with the original file extension removed).
    <!-- This Watch folder watches the Sales folder on this local machine --> <WatchFolder Name="Sales Folder Watch">    <Settings>         <!-- Folder options -->         <add Name="InputFolder" Value="C:\Company\Sales\Input"/>         <add Name="SearchFilter" Value="*.*"/>         <add Name="IncludeSubFolders" Value="True"/>         <add Name="DeleteInputSubFolders" Value="True"/>         <add Name="StagingFolder" Value="C:\Company\Sales\Staging"/>          <add Name="WorkingFolder" Value="C:\Company\Sales\Working"/>          <add Name="FailedFolder" Value="C:\Company\Sales\Failed"/>          <add Name="CompletedFolder" Value="C:\Company\Sales\Completed"/>                 <add Name="OutputFolder" Value="C:\Company\Sales\Output"/>         <add Name="PollingInterval" Value="15000"/>         <add Name="DCOMComputerName" Value="localhost"/>         <add Name="TestMode" Value="false"/>         <add Name="NormalizeFilenames" Value="false"/>         <!-- 0 means no limit>         <add Name="Polling.MaxFilesToProcessAtATime" Value="0"/>         <add Name="Polling.SynchronousFilesPickup" Value="false"/>         <add Name="UseTimeDateSubFoldersInCompleteFolder" Value="true"/>         <add Name="UseTimeDateSubFoldersInFailedFolder" Value="true"/>         <!-- Output file options -->         <add Name="Devmode settings;Resolution" Value="300"/>         <add Name="Save;Output File Format" Value="TIFF Multipaged"/>         <add Name="Save;Append" Value="0"/>         <add Name="Save;Color reduction" Value="Grey"/>         <add Name="Save;Dithering method" Value="Halftone"/>         <add Name="Save;Remove filename extension" Value="1" />         <add Name="TIFF File Format;BW compression" Value="Group4"/>         <add Name="TIFF File Format;Color compression" Value="LZW RGB"/>         <add Name="TIFF File Format;Indexed compression" Value="LZW"/>         <add Name="TIFF File Format;Greyscale compression" Value="LZW"/>         <add Name="JPEG File Format;Color compression" Value="Medium Quality"/>         <add Name="JPEG File Format;Greyscale compression" Value="High Quality"/>         <add Name="Image Options;Fill order" Value="MSB2LSB"/>         <add Name="Image Options;Fax" Value="0"/>         <add Name="Image Options;Fax Profile" Value="0"/>         <add Name="Image Options;Fax Resolution" Value="4"/>         <add Name="Processing;Rotate landscape" Value="0"/>     </Settings> </WatchFolder>
  3. Then copy the WatchFolder section and paste it under the current WatchFolder section to create a second WatchFolder section.
    <!-- This Watch folder watches the Sales folder on this local machine --> <WatchFolder Name="Sales Folder Watch">    <Settings>         <!-- Folder options -->         <add Name="InputFolder" Value="C:\Company\Sales\Input"/>         <add Name="SearchFilter" Value="*.*"/>         <add Name="IncludeSubFolders" Value="True"/>         <add Name="DeleteInputSubFolders" Value="True"/>         <add Name="StagingFolder" Value="C:\Company\Sales\Staging"/>          <add Name="WorkingFolder" Value="C:\Company\Sales\Working"/>          <add Name="FailedFolder" Value="C:\Company\Sales\Failed"/>          <add Name="CompletedFolder" Value="C:\Company\Sales\Completed"/>                 <add Name="OutputFolder" Value="C:\Company\Sales\Output"/>         <add Name="PollingInterval" Value="15000"/>         <add Name="DCOMComputerName" Value="localhost"/>         <add Name="TestMode" Value="false"/>         <add Name="NormalizeFilenames" Value="false"/>         <!-- 0 means no limit>         <add Name="Polling.MaxFilesToProcessAtATime" Value="0"/>         <add Name="Polling.SynchronousFilesPickup" Value="false"/>         <add Name="UseTimeDateSubFoldersInCompleteFolder" Value="true"/>         <add Name="UseTimeDateSubFoldersInFailedFolder" Value="true"/>         <!-- Output file options -->         <add Name="Devmode settings;Resolution" Value="300"/>         <add Name="Save;Output File Format" Value="TIFF Multipaged"/>         <add Name="Save;Append" Value="0"/>         <add Name="Save;Color reduction" Value="Grey"/>         <add Name="Save;Dithering method" Value="Halftone"/>         <add Name="Save;Remove filename extension" Value="1" />         <add Name="TIFF File Format;BW compression" Value="Group4"/>         <add Name="TIFF File Format;Color compression" Value="LZW RGB"/>         <add Name="TIFF File Format;Indexed compression" Value="LZW"/>         <add Name="TIFF File Format;Greyscale compression" Value="LZW"/>         <add Name="JPEG File Format;Color compression" Value="Medium Quality"/>         <add Name="JPEG File Format;Greyscale compression" Value="High Quality"/>         <add Name="Image Options;Fill order" Value="MSB2LSB"/>         <add Name="Image Options;Fax" Value="0"/>         <add Name="Image Options;Fax Profile" Value="0"/>         <add Name="Image Options;Fax Resolution" Value="4"/>         <add Name="Processing;Rotate landscape" Value="0"/>     </Settings> </WatchFolder>
    <!-- This Watch folder watches the Sales folder on this local machine --> <WatchFolder Name="Sales Folder Watch">    <Settings>         <!-- Folder options -->         <add Name="InputFolder" Value="C:\Company\Sales\Input"/>         <add Name="SearchFilter" Value="*.*"/>         <add Name="IncludeSubFolders" Value="True"/>         <add Name="DeleteInputSubFolders" Value="True"/>         <add Name="StagingFolder" Value="C:\Company\Sales\Staging"/>         <add Name="WorkingFolder" Value="C:\Company\Sales\Working"/>          <add Name="FailedFolder" Value="C:\Company\Sales\Failed"/>         <add Name="CompletedFolder" Value="C:\Company\Sales\Completed"/>                 <add Name="OutputFolder" Value="C:\Company\Sales\Output"/>         <add Name="PollingInterval" Value="15000"/>         <add Name="DCOMComputerName" Value="localhost"/>         <add Name="TestMode" Value="false"/>         <add Name="NormalizeFilenames" Value="false"/>         <!-- 0 means no limit>         <add Name="Polling.MaxFilesToProcessAtATime" Value="0"/>         <add Name="Polling.SynchronousFilesPickup" Value="false"/>         <add Name="UseTimeDateSubFoldersInCompleteFolder" Value="true"/>         <add Name="UseTimeDateSubFoldersInFailedFolder" Value="true"/>         <!-- Output file options -->         <add Name="Devmode settings;Resolution" Value="300"/>         <add Name="Save;Output File Format" Value="TIFF Multipaged"/>         <add Name="Save;Append" Value="0"/>         <add Name="Save;Color reduction" Value="Grey"/>         <add Name="Save;Dithering method" Value="Halftone"/>         <add Name="Save;Remove filename extension" Value="1" />         <add Name="TIFF File Format;BW compression" Value="Group4"/>         <add Name="TIFF File Format;Color compression" Value="LZW RGB"/>         <add Name="TIFF File Format;Indexed compression" Value="LZW"/>         <add Name="TIFF File Format;Greyscale compression" Value="LZW"/>         <add Name="JPEG File Format;Color compression" Value="Medium Quality"/>         <add Name="JPEG File Format;Greyscale compression" Value="High Quality"/>         <add Name="Image Options;Fill order" Value="MSB2LSB"/>         <add Name="Image Options;Fax" Value="0"/>         <add Name="Image Options;Fax Profile" Value="0"/>         <add Name="Image Options;Fax Resolution" Value="4"/>         <add Name="Processing;Rotate landscape" Value="0"/>     </Settings> </WatchFolder>
  4. Edit the second WatchFolder section with the folder paths for Purchases (NOTE: all the folder paths must be UNIQUE) and modify the Output file options section to create the file you want (ie Black and White TIFF file with original file extension removed).
    <!-- This Watch folder watches the Sales folder on this local machine --> <WatchFolder Name="Sales Folder Watch">    <Settings>         <!-- Folder options -->         <add Name="InputFolder" Value="C:\Company\Sales\Input"/>         <add Name="SearchFilter" Value="*.*"/>         <add Name="IncludeSubFolders" Value="True"/>         <add Name="DeleteInputSubFolders" Value="True"/>         <add Name="StagingFolder" Value="C:\Company\Sales\Staging"/>          <add Name="WorkingFolder" Value="C:\Company\Sales\Working"/>          <add Name="FailedFolder" Value="C:\Company\Sales\Failed"/>          <add Name="CompletedFolder" Value="C:\Company\Sales\Completed"/>                 <add Name="OutputFolder" Value="C:\Company\Sales\Output"/>         <add Name="PollingInterval" Value="15000"/>         <add Name="DCOMComputerName" Value="localhost"/>         <add Name="TestMode" Value="false"/>         <add Name="NormalizeFilenames" Value="false"/>         <!-- 0 means no limit>         <add Name="Polling.MaxFilesToProcessAtATime" Value="0"/>         <add Name="Polling.SynchronousFilesPickup" Value="false"/>         <add Name="UseTimeDateSubFoldersInCompleteFolder" Value="true"/>         <add Name="UseTimeDateSubFoldersInFailedFolder" Value="true"/>         <!-- Output file options -->         <add Name="Devmode settings;Resolution" Value="300"/>         <add Name="Save;Output File Format" Value="TIFF Multipaged"/>         <add Name="Save;Append" Value="0"/>         <add Name="Save;Color reduction" Value="Grey"/>         <add Name="Save;Dithering method" Value="Halftone"/>         <add Name="Save;Remove filename extension" Value="1" />         <add Name="TIFF File Format;BW compression" Value="Group4"/>         <add Name="TIFF File Format;Color compression" Value="LZW RGB"/>         <add Name="TIFF File Format;Indexed compression" Value="LZW"/>         <add Name="TIFF File Format;Greyscale compression" Value="LZW"/>         <add Name="JPEG File Format;Color compression" Value="Medium Quality"/>         <add Name="JPEG File Format;Greyscale compression" Value="High Quality"/>         <add Name="Image Options;Fill order" Value="MSB2LSB"/>         <add Name="Image Options;Fax" Value="0"/>         <add Name="Image Options;Fax Profile" Value="0"/>         <add Name="Image Options;Fax Resolution" Value="4"/>         <add Name="Processing;Rotate landscape" Value="0"/>     </Settings> </WatchFolder>
    <!-- This Watch folder watches the Purchases folder on this local machine --> <WatchFolder Name="Purchases Folder Watch">    <Settings>         <!-- Folder options -->         <add Name="InputFolder" Value="C:\Company\Purchases\Input"/>         <add Name="SearchFilter" Value="*.*"/>         <add Name="IncludeSubFolders" Value="True"/>         <add Name="DeleteInputSubFolders" Value="True"/>         <add Name="StagingFolder" Value="C:\Company\Purchases\Staging"/>         <add Name="WorkingFolder" Value="C:\Company\Purchases\Working"/>         <add Name="FailedFolder" Value="C:\Company\Purchases\Failed"/>         <add Name="CompletedFolder" Value="C:\Company\Purchases\Completed"/>                 <add Name="OutputFolder" Value="C:\Company\Purchases\Output"/>         <add Name="PollingInterval" Value="15000"/>         <add Name="DCOMComputerName" Value="localhost"/>         <add Name="TestMode" Value="false"/>         <add Name="NormalizeFilenames" Value="false"/>         <!-- 0 means no limit>         <add Name="Polling.MaxFilesToProcessAtATime" Value="0"/>         <add Name="Polling.SynchronousFilesPickup" Value="false"/>         <add Name="UseTimeDateSubFoldersInCompleteFolder" Value="true"/>         <add Name="UseTimeDateSubFoldersInFailedFolder" Value="true"/>         <!-- Output file options -->         <add Name="Devmode settings;Resolution" Value="300"/>         <add Name="Save;Output File Format" Value="TIFF Multipaged"/>         <add Name="Save;Append" Value="0"/>         <add Name="Save;Color reduction" Value="BW"/>         <add Name="Save;Dithering method" Value="Floyd"/>         <add Name="Save;Remove filename extension" Value="1" />         <add Name="TIFF File Format;BW compression" Value="Group4"/>         <add Name="TIFF File Format;Color compression" Value="LZW RGB"/>         <add Name="TIFF File Format;Indexed compression" Value="LZW"/>         <add Name="TIFF File Format;Greyscale compression" Value="LZW"/>         <add Name="JPEG File Format;Color compression" Value="Medium Quality"/>         <add Name="JPEG File Format;Greyscale compression" Value="High Quality"/>         <add Name="Image Options;Fill order" Value="MSB2LSB"/>         <add Name="Image Options;Fax" Value="0"/>         <add Name="Image Options;Fax Profile" Value="0"/>         <add Name="Image Options;Fax Resolution" Value="4"/>         <add Name="Processing;Rotate landscape" Value="0"/>     </Settings> </WatchFolder>
  5. Save the Watch Folder configuration file.
  6. Start the Document Conversion Service and then the Watch Folder Service.
  7. Now any files that are uploaded to the Sales Input folder will be convert to Greyscale TIFF files and saved in the Sales Output folder, while any files uploaded to the Purchase Input Folder will be converted to Black and White TIFF files and saved in the Purchases Output folder.

Additional Configuration Choices

If you do not want Document Conversion Service to use date-time subfolders in the Completed folder or Failed folder (ie C:\Company\Sales\Completed\Monday_February_10_2014_2_55_04_AM\file1.pdf), then you can disable this feature in the Watch Folder configuration file by setting UseTimeDateSubFoldersInCompleteFolder or UseTimeDateSubFoldersInFailedFolder to false:

<!-- This Watch folder watches the Sales folder on this local machine -->
<WatchFolder Name="Sales Folder Watch">
   <Settings>
        <!-- Folder options -->
        <add Name="InputFolder" Value="C:\Company\Sales\Input"/>
        <add Name="SearchFilter" Value="*.*"/>
        <add Name="IncludeSubFolders" Value="True"/>
        <add Name="DeleteInputSubFolders" Value="True"/>
        <add Name="StagingFolder" Value="C:\Company\Sales\Staging"/> 
        <add Name="WorkingFolder" Value="C:\Company\Sales\Working"/> 
        <add Name="FailedFolder" Value="C:\Company\Sales\Failed"/> 
        <add Name="CompletedFolder" Value="C:\Company\Sales\Completed"/>        
        <add Name="OutputFolder" Value="C:\Company\Sales\Output"/>
        <add Name="PollingInterval" Value="15000"/>
        <add Name="DCOMComputerName" Value="localhost"/>
        <add Name="TestMode" Value="false"/>
        <add Name="NormalizeFilenames" Value="false"/>

        <!-- 0 means no limit>
        <add Name="Polling.MaxFilesToProcessAtATime" Value="0"/>
        <add Name="Polling.SynchronousFilesPickup" Value="false"/>

        <span style="background-color: yellow;"><strong><add Name="UseTimeDateSubFoldersInCompleteFolder" Value="false"/></strong></span>
        <span style="background-color: yellow;"><strong><add Name="UseTimeDateSubFoldersInFailedFolder" Value="false"/></strong></span>

        <!-- Output file options -->
        <add Name="Devmode settings;Resolution" Value="300"/>
        <add Name="Save;Output File Format" Value="TIFF Multipaged"/>
        <add Name="Save;Append" Value="0"/>
        <add Name="Save;Color reduction" Value="Grey"/>
        <add Name="Save;Dithering method" Value="Halftone"/>
        <add Name="Save;Remove filename extension" Value="1" />
        <add Name="TIFF File Format;BW compression" Value="Group4"/>
        <add Name="TIFF File Format;Color compression" Value="LZW RGB"/>
        <add Name="TIFF File Format;Indexed compression" Value="LZW"/>
        <add Name="TIFF File Format;Greyscale compression" Value="LZW"/>
        <add Name="JPEG File Format;Color compression" Value="Medium Quality"/>
        <add Name="JPEG File Format;Greyscale compression" Value="High Quality"/>
        <add Name="Image Options;Fill order" Value="MSB2LSB"/>
        <add Name="Image Options;Fax" Value="0"/>
        <add Name="Image Options;Fax Profile" Value="0"/>
        <add Name="Image Options;Fax Resolution" Value="4"/>
        <add Name="Processing;Rotate landscape" Value="0"/>
    </Settings>
</WatchFolder>

If the Input folder initially contains a very large volume of files, then you can set the Watch Folder service to convert the files in small batches, so not to overtax the computer’s system resources.
Polling.MaxFilesToProcessAtATime is the maximum number of files to pickup at a single time.(ie 20) Polling.SynchronousFilesPickup is set to true to allow a group of files to finish converting before the next group of files is picked up:

<!-- This Watch folder watches the Sales folder on this local machine -->
<WatchFolder Name="Sales Folder Watch">
   <Settings>
        <!-- Folder options -->
        <add Name="InputFolder" Value="C:\Company\Sales\Input"/>
        <add Name="SearchFilter" Value="*.*"/>
        <add Name="IncludeSubFolders" Value="True"/>
        <add Name="DeleteInputSubFolders" Value="True"/>
        <add Name="StagingFolder" Value="C:\Company\Sales\Staging"/> 
        <add Name="WorkingFolder" Value="C:\Company\Sales\Working"/> 
        <add Name="FailedFolder" Value="C:\Company\Sales\Failed"/> 
        <add Name="CompletedFolder" Value="C:\Company\Sales\Completed"/>        
        <add Name="OutputFolder" Value="C:\Company\Sales\Output"/>
        <add Name="PollingInterval" Value="15000"/>
        <add Name="DCOMComputerName" Value="localhost"/>
        <add Name="TestMode" Value="false"/>
        <add Name="NormalizeFilenames" Value="false"/>

        <!-- 0 means no limit>
        <span style="background-color: yellow;"><strong><add Name="Polling.MaxFilesToProcessAtATime" Value="20"/></strong></span>
        <span style="background-color: yellow;"><strong><add Name="Polling.SynchronousFilesPickup" Value="true"/></strong></span>

        <add Name="UseTimeDateSubFoldersInCompleteFolder" Value="true"/>
        <add Name="UseTimeDateSubFoldersInFailedFolder" Value="true"/>

        <!-- Output file options -->
        <add Name="Devmode settings;Resolution" Value="300"/>
        <add Name="Save;Output File Format" Value="TIFF Multipaged"/>
        <add Name="Save;Append" Value="0"/>
        <add Name="Save;Color reduction" Value="Grey"/>
        <add Name="Save;Dithering method" Value="Halftone"/>
        <add Name="Save;Remove filename extension" Value="1" />
        <add Name="TIFF File Format;BW compression" Value="Group4"/>
        <add Name="TIFF File Format;Color compression" Value="LZW RGB"/>
        <add Name="TIFF File Format;Indexed compression" Value="LZW"/>
        <add Name="TIFF File Format;Greyscale compression" Value="LZW"/>
        <add Name="JPEG File Format;Color compression" Value="Medium Quality"/>
        <add Name="JPEG File Format;Greyscale compression" Value="High Quality"/>
        <add Name="Image Options;Fill order" Value="MSB2LSB"/>
        <add Name="Image Options;Fax" Value="0"/>
        <add Name="Image Options;Fax Profile" Value="0"/>
        <add Name="Image Options;Fax Resolution" Value="4"/>
        <add Name="Processing;Rotate landscape" Value="0"/>
    </Settings>
</WatchFolder>

Hope that helps in your regular document conversion processes! If you need further assistance, please contact support and we’ll be happy to help.


Looking for a PDF to TIFF converter or to convert your documents to JPG, TIFF, or PDF, then PEERNET is right for you. It’s document conversion made easy!