

You can use Hazel if you have it, create a Folder Action in Automator, or use macOS's FSEvents API to watch the folder yourself. You're almost certainly going to have to write a script to perform the file system search and move the files, and you'll need some way to trigger it.

You can ask Alfred to find files matching a serial number, but again, it's not designed to perform actions automatically without user interaction. It doesn't watch folders, which appears to be what you're asking for. Alfred is fundamentally designed to do as little as possible until you explicitly tell it to do something. Is this possible with Alfred? If so, could someone walk me through step-by-step?įor clarity, I am trying to get away from doing manual searches for the 7 digit number (the actual number is longer and more complex, making it too tedious to type for the thousands of wrongly named files that need deleting). Whenever I find one of these wrongly named files, I would like to manually drag and drop them into a folder called "files to delete", and then have Alfred examine all the filenames in the "files to delete" folder, and then find all files on my hard drive which have the same 7 digit file number, and move them into the folder "files to delete", or to simply delete them. for example the file should have been named "1234568 Bank Statement Jan 2019.pdf". Often I find such files have been mis-named. These duplicate files could be anywhere on the Mac, in random folders, somewhere on my main hard drive, on external drives and cloud drives. For example in addition to the above file name I may have files with names like: I may have a document called "1234568 Bank Statement November 2019.pdf" For historical reasons there are five or six copies of each file with slightly different names, but each contining the unique number. My hard drive has tens of thousands of files numbered sequentially, plus some additional identifying text.
