Create Multiple Watch Folder Services

When monitoring a significant number of watch folders, you may instead want to create multiple watch folder services and split your watch folders between them.

Splitting the watch folder between multiple services can decrease disruptions in your conversion process when you need to add, edit, or remove a watch folder definition.

Rather than having to stop all conversion processes on the server, you can clone the Watch Folder service to create multiple services and split your watch folder sections between the different services. Splitting the watched folders between multiple services allows you to make changes without stopping all the running conversion processes.

How to Create Multiple Watch Folder Services

The following steps show you how to create multiple watch folder services by cloning the original Watch Folder Service so you can run Watch Folder Services that are independent of each other.

Clone the Watch Folder Service

First, copy the folder “C:\Program Files\PEERNET Document Conversion Service 3.0\Tools\Watch Folder Service” and rename it to “C:\Program Files\PEERNET Document Conversion Service 3.0\Tools\Watch Folder Service##“, replacing the ## with a number or letter.

New Watch Folder Service Folder

Next, edit the PNDocConvWatchFolderService.exe.config file at C:\Program Files\PEERNET Document Conversion Service 3.0\Tools\Watch Folder Service##\ to ensure it is using folder paths that are unique from the folders in the original Watch Folder Service configuration file.

After setting up our new folders, we adjust the logging console configuration to use the new watch folder. Open “C:\Program Files\PEERNET Document Conversion Service 3.0\Tools\Watch Folder Service##\silogconfig.txt” and update the following:

  • Change the filename here to a unique name: filename=”$COMMONAPPDATA_LOGPATH$\WFSLog##.sil”
  • Update the pipename so we can connect with the console: PEERNETWatchFolderService2
  • Save the above changes.
Edit New silogconfig file

Add the New Service to the Services Control Panel

Now create a copy of the Watch Folder Service by copying and pasting the text below into an administrative command line prompt.

sc create “PEERNET Watch Folder Service ##” binpath= “C:\Program Files\PEERNET Document Conversion Service 3.0\Tools\Watch Folder Service##\PNDocConvWatchFolderService.exe” DisplayName= “PEERNET Watch Folder Service ##”

After our cloned service is created, the next task is to open the Services Panel and update the Log On As account for the new service.

New Watch Folder Service Entry

Create a new Start Menu Shortcut

The next step is to add a shortcut to the Windows Start menu to open the logging console for our cloned Watch Folder Service.

Go to Start – PEERNET Document Conversion Service 3.0 and right-click the Open Watch Folder Log Viewer menu shortcut. Choose More from the context menu, then click Open file location to open the folder where the shortcut is stored.

Create a copy of the shortcut Open Watch Folder Log Viewer and rename it.

New Watch Folder Service Viewer Shortcut Name

Right-click the new shortcut and select Properties. Edit the shortcut properties to update the pipename argument in the Target field to use the pipename chosen above for the cloned Watch Folder Service:

/pipename:PEERNETWatchFolderService##

New Watch Folder Service Viewer Shortcut Settings

Repeat steps 1-6 above for any additional Watch Folder Service you want to create.

Additional Watch Folder Tutorials