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.
How to exclude extension from custom file association
Re: How to exclude extension from custom file association
Use *;!xyz instead, "!" = not.
Ralph
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
Re: How to exclude extension from custom file association
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"
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"
Re: How to exclude extension from custom file association
@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.
@jupe - thanks also for proposed workaround - I will try with a script.
Re: How to exclude extension from custom file association
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.
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%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
-
- 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
! has no special function in this context. Create a file with "!png" as extension and it will match your definition...
FAQ | XY News RSS | XY Twitter
Re: How to exclude extension from custom file association
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%)
(OS: W11 22H2 Home x64 - XY: Current beta - Office 2019 32-bit - Display: 1920x1080 @ 125%)
-
- 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
Because png is not listed among the extensions.
FAQ | XY News RSS | XY Twitter