Fswatch jobs
I need a program/script that monitors the contents of a directory in macOS for changes (or a download from a particular website) and then replace it with another file. The file is a PDF. I can use fswatch that taps into fsevents or any other services or applications to build the solution. It can be a zsh script, macOS app with a daemon process or anything else. The only requirement is that I need the solution built fast. It will only be used for one particular file being downloaded to the folder from a particular site.
I need a Node js script (v8) that uses fswatch/Chokidar to detect directory changes, and regex to move file that comes into the directory once the directory changes are detected. Very easy script znd I have part of it put together.