Posted on

Update 2018-02-07: Corrected the contents of the .reg file to enable import.

Update 2022-03-27: Added a cmd command.

In Windows, when you create a shortcut (*.lnk) it is usually namned using the convention %s - Shortcut.lnk where %s represents the name of the file or folder you created a folder of. I rather have the newly shortcut to be named simply %s.lnk.

This is very simple to do with a registry change.

Note: This requires changes in the registry and therefore requires administrator access.

  1. Open Registry Editor

  2. Navigate to:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates
    

    Note: I did not have the key NamingTemplates. If this key is missing, create it.

  3. Inside the NamingTemplates key, create a new string with the name ShortcutNameTemplate

  4. Set the ShortcutNameTemplate string to value %s.lnk

The change should become active immediately.

If you wish to use a .reg file instead, paste the following into an empty .reg file and execute the file.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates]
"ShortcutNameTemplate"="%s.lnk"

If you wish to run a cmd command, you can run the following:

REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates /v ShortcutNameTemplate /t REG_SZ /d "%s.lnk"
comments powered by Disqus