Search code examples
javascriptgoogle-chromegoogle-chrome-extension

How to create a new folder in system with a name same as the string that is available at a specific page on webpage?


My requirement is I should be able to create new folder from chrome some how by specific name. To be specific, I visit salesforce everyday for my work and there will be different ticket numbers with description. I create manual folder to save ticket files on system drive every time I get new ticket. I imagine there should be some action of folder creation at the right click of that selected text.

Expecting something similar to this


Solution

  • If you want to interface with the operating system and create folders, you would need to use nativeMessaging. Native Messaging allows you to communicate a native program via stdin and stdout protocols. Your native program will then accept commands that tell it to create that folder.

    Here is an example extension that uses nativeMessaging https://github.com/GoogleChrome/chrome-extensions-samples/tree/main/mv2-archive/api/nativeMessaging