Running shortcut from command prompt without the .lnk extension (Windows)

11

2

I have created a folder (d:\shortcuts), created shortcuts for most applications in this folder and appended the folder path to the Path environment variable. Now all my applications are available from run and command window without messing around with Path.

However, I now have to type the name of the shortcut as well as extension (e.g. vlc.lnk) to invoke it. Is there any way to do this without typing the extension?

Abbas

Posted 2011-01-01T06:21:21.673

Reputation: 243

Answers

17

adjust the PATHEXT environment to include .lnk:

% set PATHEXT=%PATHEXT%;.lnk

by using the suffices given in PATHEXTcmd decides, what kind of files are launchables.

akira

Posted 2011-01-01T06:21:21.673

Reputation: 52 754