windows tips :

Add a create new filetype on right-click menu

I needed something today : add a shortcut to my right-clic menu for creating a new Python (or whatever) file.

Inside regedit, find the entry HKEY_CLASSES_ROOT/.py .

  • Right-click on it then add a new key and give it the name ShellNew .
  • Now, inside HKEY_CLASSES_ROOT/.py/ShellNew create a new 'chain' variable, name it NullFile and give it the value Python.

Quit regedit, now you've got your new entry inside the right-click menu.

Another solution maybe to use this Python Cookbook recipe to manipulate the registry contents.

The problem is that your new document will be empty. Using the PowerToys Tweak UI is even easier and you can have your own template : see this page for details.

Comments
Back to index
blog comments powered by Disqus

Atom feeds