11/24/2007

Load A New File From Template In Notepad++

What are needed:

  1. htmlTemplate.htm: Your html template
  2. nppNewHtml.bat: a .bat file looking like this:
copy  d:\html\htmlTemplate.htm  d:\html\new.htm
"C:\Program Files\Notepad++\notepad++.exe"  d:\html\new.htm

Save nppNewHtml.bat in, for example, d:\html.

In Notepad++, go to menu [Run], or hit [F5].

In the input box shown under the title [Type your program to run here], enter:

d:\html\nppNewHtml.bat


Hit [Save] to save it to a run menu item (give it a name like "new html").

From now on, you can go to the [Run] menu and find an item called "new html" that allows you to open a new html file based on your template.

6 comments:

Biggs said...

I know it's been 2 years already but this is a brilliant fix. Very handy. Thanks :)

Runsun said...

You are welcome, Biggs.

Unknown said...

Dude, this is awesome. Thanx a bunch!

Anonymous said...

3 years+ and this method still works. Thanks for posting this.

Anonymous said...

thanks it's works great

Anonymous said...

Thank you sir! Still works - glad this came up in the search results!