Skip to main content
Solved

FME Server Directory Watch on folders only

  • November 20, 2018
  • 2 replies
  • 32 views

Forum|alt.badge.img

I'm currently watching Folder1 and processing the data that is put there in dated folders.

Folder1

  • 20181110
  • 20181111
  • 20181112
  • etc

Each dated folder contains 3 subfolders (A,B,C) each containing a lot of shapefiles. The current system works fine as all the data is written at the time the dated folder is created. However this is soon to change and A, B and C could be written separately. I only want to process the data when A, B and C are all present.

I've tried editing the Publication to include subdirectories but this notifies on every shapefile, I've also tried just using Modify instead of Create but Modify doesn't seem to work on Folders, only files.

The only workaround I can think of is to have all the contents of A, B and C zipped before hand and thus limiting the number of notifications. But this isn't very elegant. Am I missing something?

Many thanks!

Best answer by jlutherthomas

Hi @sirrona

 

 

Apologies for the delay in responding to this question - I'm not sure whether you've found a way to do this yet. (If you have, it'd be great to know what you ended up doing)

 

 

My suggestion would be to have the directory watch trigger a workspace that would read in all of the files in the dated folder (Directory and File Pathnames Reader) and have some logic in the workspace to see if all of the folders you need are present. If they are, then you could start the process that you need when all subfolders are present.
View original
Did this help you find an answer to your question?

2 replies

Forum|alt.badge.img+2

Hi @sirrona

 

 

Apologies for the delay in responding to this question - I'm not sure whether you've found a way to do this yet. (If you have, it'd be great to know what you ended up doing)

 

 

My suggestion would be to have the directory watch trigger a workspace that would read in all of the files in the dated folder (Directory and File Pathnames Reader) and have some logic in the workspace to see if all of the folders you need are present. If they are, then you could start the process that you need when all subfolders are present.

Forum|alt.badge.img
  • Author
  • January 11, 2019
jlutherthomas wrote:

Hi @sirrona

 

 

Apologies for the delay in responding to this question - I'm not sure whether you've found a way to do this yet. (If you have, it'd be great to know what you ended up doing)

 

 

My suggestion would be to have the directory watch trigger a workspace that would read in all of the files in the dated folder (Directory and File Pathnames Reader) and have some logic in the workspace to see if all of the folders you need are present. If they are, then you could start the process that you need when all subfolders are present.

thanks @jlutherthomas, the problem I had is that I didn't know the next dated folder and couldn't watch a subfolder that didn't exist yet! I ended up using a schedule rather than a notification, looking at the root folder and checking for the latest file against ones already processed. Then using the logic you mention above to check all subfolders were present. Not as elegant as I would have hoped, but it works.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings