Copy of files using data inside PDF for destination

Hi All,

I'm not sure how difficult this is to achieve, but if anyone can help with a script to achieve the following I would be eternally grateful:

-Folder 1 (source folder) receives pdf files. If a pdf is related to a client it would have the client's code somewhere in the pdf's content.

-Folder 2 (destination folder) would be a client's specific folder elsewhere in the system. I would insert the client code into the Comments metadata of this folder.

A script that can transfer any files from Folder 1 to Folder 2 based on the client code in the pdf content matching the client code in the Comments metadata of Folder 2 is what I want to achieve (and deleting the original pdf in Folder 1). I want to be able to execute this script with Task Scheduler or some other automation...

That will be the hard part, and would need to be better defined than "somewhere within the pdf" for a script to be able to find it.

Opus doesn't have any built-in scripting objects to extract data from PDF files, so that part at least would need to involve a tool or scripting component from something else.

Copying the files, once the script knows what to copy and to where, is the easy part.

Gotcha thanks Leo, appreciate the feedback :+1:

I use a utility called File Juggler for this which allows you to move or rename documents based on their content

Thanks that is a great suggestion, I just tried it out!