Syed Mahfuzur Rahman
Syed Mahfuzur Rahman

Reputation: 477

How to add Flutter app in windows context menu list?

I want to create a simple windows file renaming application with Flutter just for learning purpose.

Here what i want to achieve with the application:

  1. I want to select multiple files from the windows file explorer.
  2. then right click on any one of them.
  3. then from windows context menu my application should be visible.
  4. then when i press on my application from that list it should open my application with all the selected file names in there and then i can rename them from there.

Example: suppose copyFilename is my application. then it should work like this:

Example copyfilename application

In above picture i selected files that i need to rename and then right clicked on them. It shows me copyFilename application in that context menu list. And finally when i clicked on it, it should open that application with the file names was selected. then i can rename then as i wish.

But my question is how to do this? What does this even called? How to add my application in that windows context menu? How to copy file names and take it inside the application when i press it from the context menu? Please give me idea how to do this and what need to be don to achieve this. Thankyou.

Upvotes: 2

Views: 868

Answers (1)

Anders
Anders

Reputation: 101756

For Windows 10 and older:

Write your command line to HKEY_CURRENT_USER\Classes\*\shell\myApp\command (Set the default value to "c:\path\myapp.exe" "%1" etc.). A shell extension (DropTarget etc.) will make it easier to get the list of filenames in a single application instance.

Read more about file associations on MSDN.

For Windows 11 you have to write a custom shell extension in native code...

Upvotes: 3

Related Questions