How to exclude extension from custom file association

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
StewCam
Posts: 6
Joined: 01 Jun 2013 03:55

How to exclude extension from custom file association

Post by StewCam »

I have a couple of custom file associations which I use to encrypt and decrypt any file. After encryption the file extension changes to .xyz but the encrypt option still shows up in the custom menu. Is it possible to exclude .xyz from the encrypt option so that it does not show up on encrypted files? I tried using the following without success:
*;-xyz
*;xyz.

RalphM
Posts: 1932
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: How to exclude extension from custom file association

Post by RalphM »

Use *;!xyz instead, "!" = not.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

jupe
Posts: 2757
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: How to exclude extension from custom file association

Post by jupe »

While this would be a nice feature (and I have wanted to do the same myself in the past), what RalphM describes doesn't exist, it isn't possible.

As a workaround I would suggest creating 1 CFI entry and make it load a script that performs a decrypt if it is a xyz file otherwise encrypt instead, and name it eg. "En/Decrypt"

StewCam
Posts: 6
Joined: 01 Jun 2013 03:55

Re: How to exclude extension from custom file association

Post by StewCam »

@RalphM - thanks for the suggestion but it seems that *;!xyz does not work (* overrides !).
@jupe - thanks also for proposed workaround - I will try with a script.

RalphM
Posts: 1932
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: How to exclude extension from custom file association

Post by RalphM »

While my example doesn't work in combination with *, one could list all available extensions and then either just omit the "xys" or add it as "!xys" (I agree not very user-friendly).
I tested it with one of my image resizing CFA's and it worked to exclude one of the extensions by stating "jpg;jpeg;!png", which made this CFA only show for jpg and jpeg's.
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: How to exclude extension from custom file association

Post by admin »

! has no special function in this context. Create a file with "!png" as extension and it will match your definition...

RalphM
Posts: 1932
Joined: 27 Jan 2005 23:38
Location: Cairns, Australia

Re: How to exclude extension from custom file association

Post by RalphM »

If that is true, why does the following CFA show up for jpg and jpeg but not png?

Code: Select all

|"IrfanView /resize_long=2000" jpg;jpeg;!png>::foreach ($item, <pfaitems>) {run """C:\Program Files (x86)\IrfanView\i_view32.exe"" $item ""/resize_long=2000 /aspectratio /resample /convert=$N_sml$O /makecopy"""}
Ralph :)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: How to exclude extension from custom file association

Post by admin »

Because png is not listed among the extensions.

Post Reply