[Help] How to rename create new file menu entries?

Discussion in 'Scripting' started by SalviaSage, Sep 3, 2018.

  1. SalviaSage

    SalviaSage MDL Novice

    Apr 9, 2018
    30
    1
    0
    Hi. There is a right click context menu for creating new files in Windows.

    I figured out how to rename these entries, but when you create a file here, it is always created with the name of whatever the create new menu entry is set to.

    So, I want to find a way to rename the context menu entries to be separate from the name of the new files they create.

    I tried anything and everything I could in the windows registry but could not achieve this goal.

    Does anyone know how?

    Thanks in advance.
     
  2. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,396
    1,322
    120
    If I/we know what you wanted to do, can help You. But no way can understand what's your problem or what you want to do or change.
    True, the easiest way to add something into right-click menu is to use the registry editor, but there are also other methods. For example, in many cases a .dll file used. Really, almost everything can be changed if you only know where those things are and what You exactly want to do. For different things may be a different methods how to do it.
    So, if there is a specific problem, we can look on it and give recommends, how to do it or solve it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SalviaSage

    SalviaSage MDL Novice

    Apr 9, 2018
    30
    1
    0
    so for example the create new entry name is : OpenDocument Text
    the newly created file name is: New OpenDocument Text

    if I change the entry name to: OpenDocument File
    newly created file name is: New OpenDocument File

    I just want to be able to keep these names separate from one another.
     
  4. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,396
    1,322
    120
    Honestly, I don't understand. Do you want to make new link in the menu named "New", it means a new shortcut, such as Word Document (the Text Document already exists there).
    You can put to right-click menu just about anything you want.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. SalviaSage

    SalviaSage MDL Novice

    Apr 9, 2018
    30
    1
    0
    No, I already know how to add entries in there.
    I also know how to change the name of the entries.

    What I am saying is I want to be able to change the default name that these files are created with.
    (by default, the files have the same name as the context menu entry but with the word "new" at the start)
     
  6. hyperstriker

    hyperstriker MDL Novice

    Nov 24, 2017
    16
    9
    0
    #6 hyperstriker, Nov 21, 2018
    Last edited: Nov 21, 2018
    It is given the understanding that you already know how to add an entry or entries in the right-click context (pull-down) menu. So, this new file type (whatever the format that it may be) is already on the list of given options to choose from.

    But...., it is my understanding that what you want to achieve is to change/replace/alter the Windows default naming scheme and convention on and for the creation of a "New" file;

    So if I am not mistaken, and If that is so, go to the "HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates" key and edit or modify the value from the "RenameNameTemplate" string with what you want to present instead of the "New" + whatever_file.ext (No "special characters" allowed).

    After this is done, whatever "New" file that you create, it will (by default) be named and presented (highlighted-selected) with whatever value is in there.


    I hope that this is what you looking for.

    naming_scheme.reg
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates]
    "RenameNameTemplate"="WHATEVER_IT_COMES_TO_MIND"
    (As_Admin.) from the command> shell:
    Code:
    reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates" /v RenameNameTemplate /t REG_SZ /d "WHATEVER_IT_COMES_TO_MIND" /f

    *NOTE:
    The the naming scheme for the "Copy" files (or a "Copy of" another file) is similar, by default, when a file is copy-pasted in the same location of the original file, it results ending named as "whatever - copy.ext" ; this naming scheme can be modified on the string called "CopyNameTemplate", which its default value is "%s - Copy", and you can change it to whatever you want (no special characters are allowed).

    On the Windows Registry;
    Code:
    [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates]
    "CopyNameTemplate"="WHATEVER_IT_TOO_COMES_TO_MIND"
    
    or, (As_Admin.) from the command shell:
    Code:
    reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\NamingTemplates" /v CopyNameTemplate /t REG_SZ /d "WHATEVER_IT_TOO_COMES_TO_MIND" /f
    

    * * * WARNING: NOT ALL SYSTEMS ARE EQUAL. THE CERTAIN CHANGES AND MODIFICATIONS OF KEYS, STRINGS, BINARIES AND WORDS VALUES IN THE WINDOWS REGISTRY CAN HAVE UNDESIRED IRREVERSIBLE RESULTS AND CAN LEAD TO THE LOSS OF DATA. DO NOT MAKE ANY CHANGE(S) UNLESS YOU ACKNOWLEDGE AND AGREE THAT YOU AND ONLY YOU, IS RESPONSIBLE OF ANY HARM OR DAMAGE FOR DOING SUCH ACTION.
     
  7. SalviaSage

    SalviaSage MDL Novice

    Apr 9, 2018
    30
    1
    0
    Are you sure about that?
    the "NamingTemplates" key is not in that registry path.
    I can create one though. This is in windows 10 version 1803
     
  8. hyperstriker

    hyperstriker MDL Novice

    Nov 24, 2017
    16
    9
    0
    #8 hyperstriker, Nov 21, 2018
    Last edited: Nov 21, 2018
    I am so very sure as I can be...
    It is why, for such case, the command shell line and .reg content to merge are for...
    It should be okay for the 1803.