Auto-complete in Dos (Hitting Tab to Complete Directory / File Names in CMD.EXE), Does Not Work!

Besides being a DotNet developer I've spent some part of my life (3 odd months) in the past, being a Linux Administrator. Every guy in the Linux world loves the bash Auto-complete feature. The part where you type the partial name of file or directory and hit the tab button and the console completes the typing of the entire file / directory name for you.

I just think it's Natural (and super cool) for an OS to be able to reduce the number of clicks (or keystrokes, for that matter) and help you get to where you want to get faster.

The Windows CMD.EXE had started supporting this feature; since, I don't when. I don't recall when I hit the tab key while I was working in the Dos Console. The Auto complete worked (just like Linux bash). In fact it worked so smoothly that I didn't even realize or think about the fact that it wasn't supposed to work! I was in DOS (CMD.EXE of windows 2003 server edition), not Linux!

Anyway, so basically, what I am trying to say is that I've been using the Auto Complete on tab feature of MS-DOS without even knowing / realizing / remembering since how long I've been using it.  Recently I showed this to another Linux IT guy who was working in MS-DOS and his reaction was - "Wow! I didn't know Dos Supports This!"

So, basically looks like this feature has been a part of MS-DOS for a VERY long time and most IT guys I've worked with or talked to don't even know / remember when this feature became a part of MS-DOS.

Recently I reinstalled Windows 2003 Server on my laptop (I was having problems with a direct install coz my Dell 700m would just hang - so I had to install windows 2000 and then upgrade to 2003) after a format and a "fresh start" and discovered that the Auto Complete on Tab feature wouldn't work any more!

As it turns out, this is a feature that may / may not be enabled on your machine by default. If you've upgraded from Windows 2000 or a previous OS to Windows 2003 Server this feature may be disabled by default. Enabling it is simple though.

Use the registry editor and change the value of HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor\CompletionChar from 0x40 to 0x9

I had a difficult time Goggling an answer for this problem so I thought I'd post it here. Here's the where this Information originally comes from. (Just so that I give Due credit to the guy for posting the solution:) )

This article is part of the GWB Archives. Original Author: Rajiv Popat

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.