I have doc, docx and PDF files wherein the filenames consist of a unique 9 digit number followed by text.
I want to move those files to their respective folders which also consist of at least the unique 9 digit number but may have different text.
Those folders are in another folder on the hard drive but I can easily move the documents to the same parent folder if needed. The files and folder names are a combination of 123456789_Firstname_Lastname.docx. Instead of underscores, there may be spaces, or commas or no spaces at all. What will be certain though, is that the file and folder name begins with 9 numbers.
I have Python installed, Hazel, and Directory Opus and can install anything else if needed to make this process work. There are thousands of files so I'd really appreciate a solution.