How can I associate a UWP verb (Windows right click action) with a folder and not just a file extension

76 Views Asked by At

I have a UWP app meant to take 0 or more arguments which are either the path to a folder or the path to a compressed archive. I want these arguments to be passed by adding a right click menu in Windows explorer. With zip or rar files it seems pretty easy:

<uap:SupportedFileTypes>
    <uap:FileType>.zip</uap:FileType>
    <uap:FileType>.rar</uap:FileType>
</uap:SupportedFileTypes>
<uap2:SupportedVerbs>
    <uap3:Verb Id="listfilesummary" Parameters="&quot;%1&quot;" MultiSelectModel="Player">File Summary</uap3:Verb>
</uap2:SupportedVerbs>

However while I know how to add the registry entries for a traditional Win32 app to have a right click action for a folder I cannot find any information on how to do this in the manifest of a UWP app.

1

There are 1 best solutions below

0
Roy Li - MSFT On

How can I associate a UWP verb (Windows right click action) with a folder

I have to say that this is not possible in UWP. You can't make a folder as the associate type of your UWP app. But you could get the neighboring files of the file for which the app was activated via the FileActivatedEventArgs.NeighboringFilesQuery Property