FileC 2.0
Filename Completion for DOS
by Mike Morearty

Download:
filec.zip

(For the latest version of this program, go to http://www.morearty.com/filec)

Quick Start

This program works on Windows 95/95/ME. It does not work on any recent versions of Windows. Similar capabilities are built into more recent operating systems; see instructions here.

To install FileC, download it into a directory that's in your path (such as C:\Windows), and then add a line to either C:\Autoexec.bat (for Win95/98) or C:\Windows\Command\Cmdinit.bat (for WinME) which runs it, e.g. C:\Windows\filec.  For a list of options, type filec -? (most useful options are -\ to append a backslash to directory names, and -Q to display a list of matching filenames if what you typed matches more than one name).

FileC does filename completion -- at the DOS command-line prompt (when running under Win95/Win98/WinME), you can type the first few characters of a filename, and then press the Tab key; FileC will fill in the rest of the name. To get a list of all files which match the characters you've typed so far, type Ctrl-D.

For example, let's say you've typed this:

C:\Windows>cd \pro_

At this point, press the Tab key.  Now the line becomes:

C:\Windows>cd "\Program Files_

The complete filename (or in this case, directory name) has been filled in.  Notice also that a quotation mark was inserted since this directory name contains a space, and that the lower-case "p" has been changed to an upper-case "P".  (Tip: The command prompt does not require a closing quotation mark at the very end of a command.  In the above example, you could just hit Return, and the "cd" command would execute successfully.)

Or, if there is more than one filename in the root directory that begins with the letters pro, you would hear a short beep.  To see a list of matching files, type Ctrl-D.  Then you'll see something like this:

C:\Windows>cd \pro
Program Files\  Projects\
C:\Windows>cd \pro_

Matching directory names will have a trailing backslash, as shown.  Also, notice that FileC has restored the command-line as you typed it, so that you can continue typing.  In the above example, you would probably type a "g" (for Program Files) and a "j" (for Projects), and then press the Tab key again.

As mentioned above, if you want this directory listing to automatically show up every time a filename can't be completed, invoke FileC with the -Q command line option.

Ignoring Certain Extensions

There are certain filenames that you seldom access directly on the command line, and these are almost always recognizable by their extension. For example, files that end in .bak are almost never accessed, because they are backup files. You may have several files in a directory with the same base name but different extensions; for example, if you are a programmer, you may have file.cpp, file.bak, file.obj, and file.exe all the same directory. In this case, file.cpp is the only one whose name you type frequently.

To get around this difficulty, FileC ignores filenames that have certain extensions. By default, all files that have the following extensions are ignored when looking for a matching filename:

.exe .com .bak .obj .ilk .idb .pdb .ncb .opt .$$$ .class

There is an exception: if, for example, file.exe is the only file that matches the letters typed, then that filename will be filled in, even though it has one of the disallowed extensions.

Also, you can easily change the list of extensions that are ignored. To do this, before installing FileC, set the environment variable FIGNORE. For example:

C:\>set FIGNORE=.exe .com .bak .tmp .old

Upper and lower case distinctions are not important. Wildcards are not allowed.

Note: Although FileC does not constantly monitor the FIGNORE variable (that is, changing FIGNORE will not instantly change FileC's behavior), you can update the FIGNORE list at any time (without taking up more memory) by simply running FileC a second time. The program will inform you that it is already installed and that it has updated the filename extension list. If the FIGNORE variable is not set when you run FileC a second time, the filename extension list will be restored to the default list.

The Disable Key, Alt-F10

There is a special key combination, Alt-F10, to temporarily disable FileC. Suppose you bring up a pop-up TSR by pressing its hotkey, and then you press Tab, because the TSR uses the Tab key; and all you get is a beep. This means that FileC doesn't know you are not at the DOS prompt, so it is trying to find a filename at the cursor position but doesn't see one. To send a tab to the TSR, type Alt-F10, and then hit Tab again. Alt-F10 temporarily disables filename completion. If you want to re-enable filename completion, type Alt-F10 a second time.

Note that filename completion is automatically turned on again after you hit Return, so Alt-F10 only affects the current line of input.

To avoid conflicts with the TSRs you use, you can change FileC's filename completion keys. See "Changing the Key Bindings" (below).

Changing the Key Bindings

You may want to change the keystrokes that are used to invoke FileC (Tab and Ctrl-D). To change these key bindings, you can use the configuration program, FileCKey. (Just type fileckey to run it; the program is self-explanatory.)

Not only will this program allow you to change the Filename Completion key (normally Tab) and the Directory key (normally Ctrl-D), but it will also let you assign a "Change From" key and a "Change To" key. For example, you can assign Ctrl-U to the "Change From" key, and Escape to the "Change To" key. Then, whenever you type Ctrl-U at the command line, DOS will think you typed Escape. This can be useful if you want to assign Escape as your filename completion key, but your version of DOS recognizes no key other than Escape to erase the currently entered text.

This key translation will only be done while you are typing on the command line -- it will not be done when you are running a program.

You can also specify a "Disable" key with the FileCKey program. This key, which is Alt-F10 by default, allows you to temporarily disable filename completion.

Options

FileC has the following command-line options (which can be specified in either upper or lower case):

-?    Display a brief usage message.
-\ When doing completion, automatically append a backslash if the name that was matched is the name of a directory. This is nice for completing directory names in commands like type longdir\filename.
-B Suppress the beep when errors occur.
-Q Quick dir: If you try to do filename completion, and the partial filename you entered matches more than one file, immediately display a list of matching files (as if you had hit the directory key).

Rarely-used options related to compatibility with different systems:
-A Make the two hotkeys always active. This is useful to those users who have a nonstandard shell (one other than command.com) which does not work with FileC; specifying this option may help. Note that with this option specified, the hotkeys will always have special behavior. For example, even after you load another program, the Tab key will still be interpreted by FileC as a special character. Not only that, but it is quite easy to crash your system if you press a FileC hotkey when an application is loaded. The upshot of all this is that if you use the -A option, your FileC hotkeys should be keys that you never type when running an application. (The Disable key, Alt-F10, also remains in effect.)
-C Use compatibility mode. Some computers and screen adapter cards are incompatible with the IBM PC in terms of how they store screen information. If you always get a beep when you hit Tab, try using the -C option.
-D Use DosEdit mode. This mode slightly changes the behavior of FileC to make it work with DosEdit. The trick used by the -D option works for DosEdit, but it does not work for the similar program Ced. However, a patch for Ced version 1.0D is included with FileC to allow proper backspacing. This patch should work even on versions of Ced that have already had other patches applied. To patch Ced, copy the file cedfilec.dbg to the directory that has Ced, CD to that directory, and then type debug <cedfilec.dbg. This will create a new version called newced.com. After you have tried newced and are satisfied that it works, you will probably want to put your original ced.com in storage and rename newced.com to ced.com.
-V Use DOS video calls (rather than ROM video calls). This option is useful if you are using a screen device driver that has special characteristics, such as using the 25th line of the screen as a status line (which FileC would overwrite if it used the ROM video calls).

Version History

1.00    (1987) Original release.
1.01 Slightly improved snow control; corrected to work on any page of a color system; changed to free up environment space before exiting; changed to append a backslash to directory names in a directory listing; added -L (or /L) option for lower-case directory listing, and -B option to not beep.
1.02 Command line options can be together -LB; added dynamic changing of FIGNORE list by re-running FileC.
1.03 Added ability to work with graphics screens, EGA, etc. by default or with -C compatibility mode.
1.04 Added -V option for DOS screen writing, and -D option for DosEdit users. Included cedfilec.dbg patch for Ced version 1.0D. Improved testing of FileC being already resident.
1.05 Added hard error handler; modified to work in DOS 4 and OS/2 compatibility box; added -A for hotkeys always being active.
1.06 Added support for DOS 5's Doskey utility.
1.07 Changed default completion key from Escape to Tab; added code to make it safe to simultaneously use FileC in multiple DOS boxes under Windows; added a usage message if -? or an invalid option is specified; added -Q option to automatically display directory of matching files if an attempt to do filename completion matched more than one file; added -\ option to append backslash to directory names when doing completion.
2.0 (Sep. 2000) Added full support for long filenames; removed -L (lower-case directory listings) option, since it no longer makes sense in the presence of mixed-case filenames.

Back to home page