Reputation: 477
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:
Example: suppose copyFilename is my application. then it should work like this:
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
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