Synchronizing Folders To Convert Only New Files in Watch Folder
By using the Watch Folder service and a batch file, you are able to synchronize your folders so that only new files placed in a Master folder are converted.
How to Synchronize the Folders to Convert Only New Files
- Stop Watch Folder Service. (Start – Programs – Document Conversion Service 3.0 – Watch Folder – Stop Watch Folder Service)
- Open Watch Folder configuration file. (Start – Programs – Document Conversion Service 3.0 – Watch Folder – Configure Watch Folder Settings)
- Scroll down to the WatchFolder section you are using. This example, we are modifying the ConvertToTIFF section.
- Change <add Name=”UseTimeDateSubFoldersInCompletedFolder …” to FALSE
- Make sure there is a path for the Completed folder (ie <add Name=”CompletedFolder” Value=”C:\PEERNET\Completed”/> )
- Save the Watch Folder configuration file.
- Start the Watch Folder Service. (Start – Programs – Document Conversion Service 3.0 – Watch Folder – Start Watch Folder Service)
<WatchFolder Name="ConvertToTIFF Watch Folder"> <Settings> <!-- Folder options --> <add Name="InputFolder" Value="C:\PEERNET\Input"/> <add Name="SearchFilter" Value="*.*"/> <add Name="IncludeSubFolders" Value="True"/> <add Name="DeleteInputSubFolders" Value="True"/> <add Name="StagingFolder" Value="C:\PEERNET\WatchFolders\ConvertToTIFF\Staging"/> <add Name="WorkingFolder" Value="C:\PEERNET\WatchFolders\ConvertToTIFF\Working"/> <add Name="FailedFolder" Value="C:\PEERNET\WatchFolders\ConvertToTIFF\Failed"/> <add Name="CompletedFolder" Value="C:\PEERNET\Completed"/> <add Name="OutputFolder" Value="C:\PEERNET\WatchFolders\ConvertToTIFF\Output"/> <add Name="PollingInterval" Value="15000"/> <add Name="DCOMComputerName" Value="localhost"/> <add Name="TestMode" Value="false"/> <add Name="NormalizeFilenames" Value="false"/> <add Name="CopyInstructionsFromResources" Value="ReadMe_ConvertToTIFF"/> <!-- 0 means no limit --> <add Name="Polling.MaxFilesToProcessAtATime" Value="0" /> <add Name="Polling.SynchronousFilePickup" Value="false" /> <add Name="UseTimeDateSubFoldersInCompletedFolder" Value="false" /> <add Name="UseTimeDateSubFoldersInFailedFolder" Value="true" />
- Now create a file called Upload.bat and add these lines:
@echo off FOR %%F IN ("C:\Input\*.*") DO ( IF NOT EXIST "C:\PEERNET\Completed\%%~nF%%~xF" xcopy "C:\Input\%%~nF%%~xF" "C:\PEERNET\Input" /Y )
- Edit Upload.bat to change:
- “C:\Input” to the Master folder where your new files are saved
- “C:\PEERNET\Completed” to the Completed folder in your Watch Folder configuration file
- “C:\PEERNET\Input” to the Input folder in your Watch Folder configuration file
- You can either manually run Upload.bat to copy any new files since the last conversion to the Input folder or you can set Upload.bat in a scheduled task that runs periodically, so that the checking is done automatically throughout the day.