Q: I want to be able to run DJGPP both under Windows 9X with long
file names, and when I boot into plain DOS, where long file names aren't
supported. How can I set that up?
A: Such a setup is possible, but it involves a few special actions, and some vigilance on your part during routine operations.
First, you must set the option in the Windows registry which prevents it
from using numeric tails when it invents short 8+3 aliases for long file
names. When numeric tails are enabled, and a file with a long name is
created, Windows generates a short 8+3 alias for that long name by
attaching to the first 6 characters of the basename a numeric tail
~n, where n is a digit. For example, a file called
ALongFileName.LongExtension will get a short alias
alongf~1.lon. When you then reboot into plain DOS, your programs
will see this short version only, which will almost certainly break
them, since, when a program running under DOS asks for a file with the
above long name, DOS transparently truncates it to
and such a file does not exist. Disabling the numeric tails forces
Windows not to use numeric tails unless there is another file in the
same directory whose short alias clashes with that of the new file. If
no such clash happens, Windows will simply truncate the long name as DOS
would, which is exactly what you want.
Here is how you disable the numeric tails on Windows 9X:
regedit, to start the Registry Editor.
HKEY_LOCAL_MACHINEbranch of the registry until you see in the left pane an item called
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\FileSystem, then click on it.
FileSystemkey. If you don't see an item there called
NameNumericTail, select "New", "Binary Value" from the "Edit" menu, then type
NameNumericTailand it will appear. Now double-click on
NameNumericTailand enter a value of 0.
regeditand restart Windows 9X.
As an alternative to running
regedit, you can create a file
notail.reg (the name is arbitrary, but it
must have a
.reg extension), with this content:
REGEDIT4 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem] "NameNumericTail"=hex:00
then double-click on the name of this file in Explorer or My Computer.
Windows will then run
regedit for you. You still need to
reboot the machine afterwards.
NameNumericTail to 0 breaks some programs, you can
restore its original setting temporarily, while you run those programs.
NameNumericTail only affects the short names of new files being
created, it has no effect on the files that already exist.41
Besides the numeric tails, you need to make sure any files and
directories you create have unique 8+3 aliases which are true
truncations of the long names to 8+3 limits. This means that you should
avoid file names with leading dots, such as
.bashrc, file names with more than a single dot, like
make-3.77.tar.gz, or file names which include characters not
allowed by DOS, like
One other problem is to avoid using programs which create numeric tails
even if they are disabled in Windows. One such program is
pkunzip version 2.50. Don't use it, if you want to keep your
dual DOS/Windows installation in working order.
The most simple method of deciding at boot time which configuration (DOS
or Windows) to start is to edit the (hidden) file
which is a text file in Windows 9X, and force the Windows boot process
to present a menu where one menu item, called "Command Prompt Only",
allows you to start DOS 7 without the Windows GUI. To this end, change
the line of
MSDOS.SYS that reads "BootMenu=0" to say
"BootMenu=1" instead, and reboot. Since
MSDOS.SYS is a hidden
file, you will need to remove the hidden attribute from it before you
can edit it; use the
ATTRIB command for that.