Aliaspooryorik
ColdFusion ORM Book

Handy tip when editing the hosts file

A handy little tip for anyone who has to edit the hosts file on Windows. If like me you get bored of firing up Notepad (or equivalent) and then having to browse to open up the hosts file, then you can simply create a shortcut to it, which automatically opens up the hosts file in Notepad. To do it:

  1. Create a shortcut file (right click, new -> shortcut)
  2. In the "location" browser box type in:
    "C:\WINDOWS\Notepad.exe" "c:\windows\system32\drivers\etc\hosts"
  3. Click next
  4. Type in whatever you like for your shortcut name
  5. Click finish

Now when you click on your new shortcut, it will open up the hosts file in notepad without you having to do any of that tedious browsing.

P.S. If you are still using Notepad, then I suggest you have a look at Notepad++ as a really good replacement.


4 comments

  1. I try to leave hosts and httpd.conf up in the first two tabs in Notepadd++. They are easy to find when I need them.

    Comment by Bradley Moore – January 20, 2009
  2. It's a silly little niggle, but you don't need the full path to notepad. Entering:

    notepad "c:\windows\system32\drivers\etc\hosts"

    will work just fine. See, I told you it was a niggle. :-)

    Great tip, though. I've kept a shortcut on my desktop for years doing it just as you suggest. It's damn handy.

    Comment by Rob Wilkerson – January 20, 2009
  3. @Bradley, yeah that works, I use Notepad++ a lot so it gets a bit annoying leaving them in.

    @Rob, That is picky! I left it with the full path in to make it obvious for people who wanted to change it their editor of choice :)

    Comment by John Whish – January 21, 2009
  4. Very useful, John, thanks.

    Comment by Julian Halliwell – January 22, 2009

Leave a comment

If you found this post useful, interesting or just plain wrong, let me know - I like feedback :)

Please note: If you haven't commented before, then your comments will be moderated before they are displayed.

Please subscribe me to any further comments
 

Search

Wish List

Found something helpful & want to say ’thanks‘? Then visit my Amazon Wish List :)

Categories

Recent Posts