Create a windows shortcut (.LNK file) Originally in the NT4 Server Resource Kit, this utility fails under Windows 10.
A good free alternative is shortcut.exe from [ mirror].

Shortcuts can also be created using VBScript or PowerShell: New-Shortcut

      SHORTCUT [options]

   -t target    : The path and file name of the application/document to open.
   -a arguments : The arguments passed when the shortcut is used.
   -d directory : The folder to start the application in.
   -i iconfile  : The file the icon is in.
   -x index     : The index into the icon file.
   -n name      : The path and file name (.LNK) of the shortcut file.
   -c           : Change existing shortcut.
   -r           : Resolve broken shortcut.
   -f           : Force overwrite of an existing short cut.
   -s           : Make shortcut simple (don’t use LinkResolve).
   -l logfile   : Save any error messages in the specified file.
   -u [spec]    : ECHO the contents of an existing shortcut. 
                  'all' is the same as 'natdix' but the letters 
                  of 'natdix' specify the options to be exported
                  The same option can be specified more than once e.g. -u natn

“The reasonable man adapts himself to the world: the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man” ~ George Bernard Shaw

Related commands

Explorer.exe - Open Windows Explorer to show a directory, also accepts variables.
MD - Create folder(s)
FSUTIL - Create a Hardlink.
PowerShell: New-Shortcut
VBScript: Create Shortcut
RUN commands - Start ➞ Run commands.
Q158682 - Shortcuts resolve to a UNC Path (LinkResolveIgnoreLinkInfo)
Q150215 - Disable Automatic Shortcut Resolution.
Q254493 - Shortcut.exe fails with sub-folder names.
Q263324 - Shortcut.exe truncates long path names.
Q134552 - Shortcut key for shortcut only works when placed on Start Menu.
Equivalent bash command (Linux): symlink - Make a new name for a file, ln - Make links between files.

Copyright © 1999-2024
Some rights reserved