More Odd and Interesting Notepad Problems Surface

In our books, we recommend that Windows users build their first HTML documents using the built-in Notepad text editor. This does involve some contortions when saving files in Notepad because you have to remember to use the “Save as” command, and then select the “All Files (*.*)” entry in the “Save as type:” text entry box so that the program will permit you to save your work in .htm or .html format. Otherwise, it will cheerfully add a .txt extension to your file, and ignore the file type that you really want to use.

A recent email exchange with one of our readers [shout out to Robert McBroom, with whom we worked through some issues] let us know that there will be instances where Windows Notepad “loses” the “All files (*.*)” option, or where it fails to the display the (*.*) file wildcard specification inside Notepad when using the “Save as” command. If that ever happens to you, the first thing I recommend trying is the built-in Windows System File Checker (sfc) utility.

In Robert’s case, when he ran the sfc /scannow command (which checks Windows files to make sure they’re all intact and not corrupted, and which automatically replaces anything questionable it finds during the scanning process), it found and made quite a few changes. When he re-opened Notepad after that, he did get his “Save as” menu options restored, but for some reason neither of us yet understands, he still couldn’t save files in .html or .htm format (though the All Files entry reappeared, he didn’t get the (*.*) wildcard specification restored and thus still couldn’t save the file except with a .txt extension).

There are two ways to proceed when you find youself in such a fix. One is to use Windows Explorer to rename the file from test.html.txt simply to test.html. In most cases this will work. But if you still can’t open the resulting file in a Web browser, it’s time to switch tools. You can download Notepad++ (aka NotePad Plus Plus, a GPL freeware program that supports lots of programming and markup languages, including HTML) or a great tool like Dave Raggett’s excellent HTML-Kit (which is specifically designed for XHTML, XHTML, CSS, and various XML applications).

Just remember, when you run into problems building HTML or other markup files because one particular tool won’t behave properly — even if it’s a tool we specifically recommend in the book — there are always many more tools out there you can use to do the same jobs instead. If you’re stumped, send us an e-mail or use our Twitter feed to ask for input and recommendations. We’ll try to get you back to work ASAP.

Leave a Reply

Your email address will not be published. Required fields are marked *