Skip to main content

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!

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.

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.


Reply