Right click > "Add new website template" in Windows 7

1 August 2012, Danny Connell

      Like many developers, I have a website template that I use as a starting point for every web project I do, whether it's a client project, or just a quick demo page.

This is made up of an index.html file, along with a folder named assets which contains folders for css, fonts, images and js and some respective files therein.

I find myself using this template more and more frequently, and every time I must: open Explorer, navigate to my template folder, then copy and paste it to the location I'm currently working in.

Bit of a ballache!

Wouldn't it be great if I could just right click anywhere and have an option to create a new website folder right there?

Here's how!

  • Press Win Key, type regedit and hit Enter to launch the registry editor
  • Navigate to HKEY_CLASSES_ROOT > Directory > Background > shell
  • Right click on shell and choose New > Key
  • Enter the name NewWebsiteTemplate and hit Enter
  • On the right hand pane, double click (Default)
  • In the text field, enter New website template (or whatever you want it to say on the right-click menu).
  • Right click on NewWebsiteTemplate and choose New > Key
  • Enter the name Command and hit Enter
  • In the right-hand pane, double click (Default)
  • Enter the following text, replacing the first path with the path where you keep your template (I keep mine in a dropbox subfolder so that I always have an up-to-date copy wherever I am):
    xcopy "C:\Dropbox\website template" "%V\New website template\" /E
  • Hit Enter

Registy editor - Right click > Add new website template in Windows 7

And that's it! Alternatively, you can save the following file, open it, change the first path to the path of your template, save it and double click it to apply the registry changes.

Download registry file

If anyone can make this better and add the option to the right click > New menu, please shout up!

Read more