Open selected file using specific program

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
SteveH
Junior Member
Junior Member
Posts: 4
Joined: 2011-09-01, 15:16 UTC

Open selected file using specific program

Post by *SteveH »

I am wanting to create some buttons that will allow me to open files using specific programs rather than the default file associations. I don't need anything ‘clever’ offering me choices based on ‘open with’ choices - just a fixed button that would open the selected file in (say) Foxit Phantom rather than Acrobat reader or Sublime Text instead of Notepad.

I think this is probably straightforward but can’t think where to start.
User avatar
Dalai
Power Member
Power Member
Posts: 10022
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Open selected file using specific program

Post by *Dalai »

It's really easy: Create a new button with the command you want to run and put %P%N in the parameters. Alternative way: Drag the application's executable to the button bar and drop it on a free space there. Then edit the newly created button and add %P%N in the parameters field.

To use such a button, place the cursor in a file and click the button.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
SteveH
Junior Member
Junior Member
Posts: 4
Joined: 2011-09-01, 15:16 UTC

Re: Open selected file using specific program

Post by *SteveH »

Thank you - that’s really helpful.
User avatar
Gral
Power Member
Power Member
Posts: 1609
Joined: 2005-01-26, 15:12 UTC

Re: Open selected file using specific program

Post by *Gral »

2 SteveH
Are you familiar with a TC function called "Internal associations"?
Using it, you can open files by just pressing ENTER with programs other than those associated system wide.
So, using your example, PDFs by Foxit, TXTs in Sublime, without changing system wide assoociations.
Sometimes it's more convenient than button.
jeee_michel
Junior Member
Junior Member
Posts: 13
Joined: 2022-04-19, 15:04 UTC

Re: Open selected file using specific program

Post by *jeee_michel »

i was looking for this for long time! its working but its wont open multi selected files and instead opening only last selected, is it possible to open multi selected files that way?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7012
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open selected file using specific program

Post by *Horst.Epp »

jeee_michel wrote: 2022-04-19, 15:58 UTC i was looking for this for long time! its working but its wont open multi selected files and instead opening only last selected, is it possible to open multi selected files that way?
Use %S instead of %P%N in your button
and you can select more than file file if your tool supports it.
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
jeee_michel
Junior Member
Junior Member
Posts: 13
Joined: 2022-04-19, 15:04 UTC

Re: Open selected file using specific program

Post by *jeee_michel »

I tried with Photshop and Illustrator it didnt work.. :<
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7012
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Open selected file using specific program

Post by *Horst.Epp »

jeee_michel wrote: 2022-04-19, 16:21 UTC I tried with Photshop and Illustrator it didnt work.. :<
Look for help on their command line syntax.
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
jeee_michel
Junior Member
Junior Member
Posts: 13
Joined: 2022-04-19, 15:04 UTC

Re: Open selected file using specific program

Post by *jeee_michel »

I will Thanks..
jeee_michel
Junior Member
Junior Member
Posts: 13
Joined: 2022-04-19, 15:04 UTC

Re: Open selected file using specific program

Post by *jeee_michel »

i figured out! it works with %P%S if anybody needs
Post Reply