4

Is it possible to add a new entry in the context menu New which will generate a file based on a fixed template?

enter image description here

For example: I'd like to create a new html file where its content should be:

<html>
 <head>
  <title>New File</title>
 </head>
 <body>
  <!-- Body Contents -->
 </body>
</html>
nixda
  • 27,268
SaidbakR
  • 308

1 Answers1

2

Actually, and31415's link should work as you'd expect. Based on linked answer:

Just open regedit and navigate to [HKEY_CLASSES_ROOT\.html\ShellNew]. Create a new String Value named FileName (no spaces, note uppercase letters). Double-click it and give it a value: html.html.

Edit String

Next, open explorer, navigate to %APPDATA%\Microsoft\Windows\Templates and create a file called html.html. This is your template file where you can put the desired content to appear in each new html file that you create from context menu.

Shazvi
  • 1,300
  • 10
  • 14
  • I have done what you regarded and I performed restarting Windows, but nothing I have got. This is a screen shot showing what I have done: http://postimg.org/image/v10zjlcm5/ – SaidbakR Mar 31 '14 at 15:34