directory contents change detection

Hi, I want to be able to detect when a file is added or deleted from a file directory. I want to use this to trigger re-indexing the folder contents. I can think of having a recursive loop with a list files node, the output of which is compared with the previous iteration of List files and detect changes, if any. Is there a simpler and more direct way of detecting directory contents change?

Thanks.

Hi @ramachna -

You might check out this component on the Hub. It monitors a directory to see when anything is added. You might be able to adapt it for other uses too:

https://kni.me/w/ux-k5owGRD9QgP8S

1 Like

Thanks for your reply @ScottF . I checked out the component you mentioned. It only monitors an empty folder and stops when any file is added to the folder. What I am looking for is a way to monitor a folder with existing files for any addition or deletion. I can’t figure out a way of adapting this component for my requirement.

Any other suggestions?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.