Open the URL from a web shortcut file in the browser
$ npm install open-shortcut
const openShortcut = require('open-shortcut');
(async () => {
await openShortcut('google');
console.log('URL opened in the browser');
})();
In the above example it will look for the following file:
- macOS:
google.webloc
- Linux:
google.desktop
- Windows:
google.url
Returns a Promise for the child process.
Type: string
File path to the web shortcut.
Leave out the extension for cross-platform compatibility.
- open-shortcut-cli - CLI for this module
- shortcut-url - Get the URL from a web shortcut file