Running scripts on multiple files from registry

This Forum is for the use of End Users requiring help and assistance for Tracker Software's PDF-Tools.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Post Reply
Martin Berg
User
Posts: 5
Joined: Wed Dec 15, 2021 8:16 am

Running scripts on multiple files from registry

Post by Martin Berg »

Hello!

I'm trying to create a convenient workflow in my organisation and as a part of that we've created a specialized context menu in explorer for running various scripts and such. Among other things, we use this to run the various tools of PDF-Tools on specific files. We're doing this with keys in the windows registry, without any programming at all. It works great except for one small problem.

A command such as this:

Code: Select all

"C:\Program Files\Tracker Software\PDF Tools\PDFXTools.exe" /RunTool "{CFB28590-2758-4908-9A8825C29932E5F3}" "%1"
Works just fine for a folder of PDF-files.

Similarily, this command:

Code: Select all

"C:\Program Files\Tracker Software\PDF Tools\PDFXTools.exe" /RunTool "{7C523D21-00C2-405C-9AAABFEEC315A3E2}" "%1"
Works fine for single files.

However, if we use the second command while selecting multiple files, each file will be run by a separate instance of PDF-Tools, which is problematic. I understand that the "right" solution probably is some kind of context menu handler, but I think we'd have to do that in C++, and our skills are quite weak in that area. I think another solution would be if PDF-Tools accepted an argument that made additional instances check for already running instances and send the file there instead. Or perhaps the most convenient thing would be if PDF-tools included some feature for what we're trying to accomplish here, that is custom right click menues?

I'm open for all sorts of advice on this! Think of this being somewhere in between asking for help and offering a suggestion for improvement :)

Best Regards,
Martin Berg
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17765
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Running scripts on multiple files from registry

Post by Tracker Supp-Stefan »

Hello Martin Berg,

Are you trying to run the command line separately for each file?
Have you checked the parameters for the /RunTool shown here:
https://help.pdf-xchange.com/pdfxt9/
And pass your files as a list to a single call of /RunTool?

your "%1" to contain "c:\file1.ext" "c:\file2.ext"

Kind regards,
Stefan
Post Reply