Replace a file after it is downloaded by monitoring a directory in macOS

Viewed 36

I need to continuously monitor a folder for a new file being downloaded, say from a site www.abc[.]com, and then replace it with an existing file. That is, the downloaded file should be rewritten with the contents from the old file. The file is a PDF. The system being used is macOS. Could someone advise on how I could script a solution for the same?

0 Answers
Related