How can you check if there is a new file in a folder? I’ve checked the solution here, but it has to have a specific file name.
I’m trying to watch a folder so that when there is a new file the file is picked up and an action is done with this file. Otherwise it keeps checking.
Also, if there are two files, the older file is picked up
What commands I need to use to achieve this?