VOGONS


Long file name support

Topic actions

First post, by bkoopers

User metadata
Rank Newbie
Rank
Newbie

When I open a command prompt window in Windows, the DOS commands support long file names. On my 32-bit Windows XP computer, I run compiled QuickBASIC software (which does not support long file files) but the code makes calls to DOS batch files that do support long file names (that is how I get my old software to work with long file names). When I use DOSBox on my 64-bit Windows 8 computer, the DOS commands (like DIR) only show the short (8.3 format) file names. Is there a way to add long file name support to the DOSBox DOS commands?

Thanks to anybody who can help me out.

Reply 1 of 15, by Joey_sw

User metadata
Rank Oldbie
Rank
Oldbie

DOSBox emulates DOS, not Windows LFN,
for your need, you better use VM with x86 windows (95 to XP) on it

-fffuuu

Reply 3 of 15, by bkoopers

User metadata
Rank Newbie
Rank
Newbie

Joey_sw: Thanks for your response.

I use the compiled QuickBASIC software (which I originally wrote years before Windows) to process text files for my baseball simulation league and I am trying to avoid spending time re-writing the software. Once the files are processed, I need to use them in regular Windows software. If I had a "VM with x86 windows (95 to XP) on it", would that not be like having a separate computer and a separate file system or can the files be shared between the VM system and regular Windows?

How would I set up a "VM with x86 windows (95 to XP) on it"? I have never done that before.

Are you saying that it is not possible to add Windows LFN support to DOSBox?

Reply 4 of 15, by VileR

User metadata
Rank l33t
Rank
l33t

Short answer - no, it isn't.

Long answer - maybe, but you'd probably need a hard drive image to boot an actual DOS with third-party LFN support (or DOS 7.x, or Win9x). Might work, but it's not officially supported, and using a HDD image means you're still separated from your host file system anyway.

[ WEB ] - [ BLOG ] - [ TUBE ] - [ CODE ]

Reply 5 of 15, by bkoopers

User metadata
Rank Newbie
Rank
Newbie

Is there any software package available (similar to DOSBox), that will allow me to run my old compiled QuickBASIC software intermixed with batch files that support long file names?

If not then I guess I will have to maintain a 32-bit Windows computer to run the old software. I was hoping to be able to move to 64-bit Windows 8 and just have one computer to do everything I need.

Maybe I need to find somebody that I can pay to convert my old QuickBASIC software to a current day software. I just don't have the time to do it myself but I still need to use the software. Is there a place I can advertise for a programmer to see how much it would cost?

Reply 6 of 15, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Use Virtualbox and install XP in it.
Is there an XP mode in W8? In W7 Pro or so that is already a built in VM with XP.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 7 of 15, by kolano

User metadata
Rank Oldbie
Rank
Oldbie
Dominus wrote:

Use Virtualbox and install XP in it.
Is there an XP mode in W8?

The free "XP Mode" from Windows 7 id no longer available for Windows 8, so yeah, for non-paid options Virtualbox /w an XP install is likely the best bet.

Reply 9 of 15, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Are you saying that you don't have the original source for these files anywhere? Because there are free alternatives to QuickBASIC which can easily run old QuickBASIC source code in Windows, namely FreeBASIC.

bkoopers wrote:

Is there any software package available (similar to DOSBox), that will allow me to run my old compiled QuickBASIC software intermixed with batch files that support long file names?

I'm not sure if TameDOS can do anything with long file names, but it might be worth a look.

Maybe I need to find somebody that I can pay to convert my old QuickBASIC software to a current day software. I just don't have the time to do it myself but I still need to use the software. Is there a place I can advertise for a programmer to see how much it would cost?

I'm a little unclear on what exactly you need. You say "the code makes calls to DOS batch files that do support long file names", which suggests that your QuickBASIC program doesn't actually manipulate long filenames itself. It seems to me that it might be feasible to change the batch files to log the filename changes instead of changing them right away, and then run a batch file in Windows to actually change the names.

bkoopers wrote:

Once the files are processed, I need to use them in regular Windows software. If I had a "VM with x86 windows (95 to XP) on it", would that not be like having a separate computer and a separate file system or can the files be shared between the VM system and regular Windows?

To be quite clear, while the main OS components of the VM would pretty much have to reside on their own disk image, it is otherwise fairly trivial to share files between the VM and regular Windows.

Dominus wrote:

VMWare Lite might be an option, too

I've never even heard of that before. What exactly is the difference? Google is kind of unhelpful.

Reply 10 of 15, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

It just came up when I did a quick googling whether W8 still has XP mode. Might have been meant to be VMware Player

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 11 of 15, by bkoopers

User metadata
Rank Newbie
Rank
Newbie

Jorpho:

I have the source code for all the programs and I have looked into converting them into "True BASIC" but it is not as easy as it sounds. The code is heavily augmented with routines from the QuickPak Professional library (which was a very popular QuickBASIC add-on in the pre-Windows days of DOS). In addition, the compiled code is compacted by another add-on to reduce the memory requirements (otherwise some of the programs would run out of memory). It is just too much work to re-write all the QuickPak routines using just QuickBASIC commands in order to make it ready to convert to "True BASIC" (or "FreeBASIC").

The compiled QuickBASIC software reformats text files (containing baseball scoresheets, boxscores, play-by-play and statistics) that are created by a baseball simulation program (called Diamond Mind Baseball). The file names are in LFN format and QuickBASIC cannot open them. Instead, whenever the QuickBASIC software needs to open a file, it makes a call to a batch file (which supports LFN) which renames it to a temporary 8.3 file name and after the processing is finished, a call to another batch file renames the file back to LFN. To re-do this complex software is not something I want to do.

Reply 12 of 15, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
bkoopers wrote:

I have the source code for all the programs and I have looked into converting them into "True BASIC" but it is not as easy as it sounds.

Have you even looked at FreeBASIC? You are not the first person who has ever needed to run QuickBASIC code on a modern machine, even with QuickPak routines (judging from this, anyway).

Instead, whenever the QuickBASIC software needs to open a file, it makes a call to a batch file (which supports LFN) which renames it to a temporary 8.3 file name and after the processing is finished, a call to another batch file renames the file back to LFN. To re-do this complex software is not something I want to do.

QuickBASIC code can be complicated, sure, but I cannot comprehend a batch file that performs rename operations as "complex software". You can PM me with the details if you are so inclined, but I am pretty busy these days and cannot make any promises.

In the end, VMware (even running Windows XP) may be your best bet. I say again that sharing files between a VMware guest and a host machine is a trivial operation.

Reply 13 of 15, by bkoopers

User metadata
Rank Newbie
Rank
Newbie

Jorpho: Thanks for the response.

I will look in FreeBASIC and see how much effort the conversion will be. Maybe I can advertise at the forum there for a programmer to do the conversion for me.

The batch files are not complex. They do a simple job of piping a long file name into a file named in in 8.3 format, then renaming the actual file to 8.3 so QuickBASIC can open it, and later renaming the file back to LFN fiormat. The program that needs to handle LFN files is about 1500 lines long. Compared to other programs that have thousands of lines of code, that is not big but is big enough to be more time-consuming than I have the time to do. I also have about 50 other QuickBASIC programs that only deal with 8.3 files which should work in DOSBox. In an ideal world, I would like to have everything converted to FreeBASIC. Some of the programs were originally created in the late 1970's and early 1980's using my Radio Shack TRS-80 Model II computer and then transferred to my Kaypro II CP/M computer and later converted to QuickBASIC in the 1990's when I got a Microsoft DOS computer.

Reply 14 of 15, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
bkoopers wrote:

The batch files are not complex. They do a simple job of piping a long file name into a file named in in 8.3 format, then renaming the actual file to 8.3 so QuickBASIC can open it, and later renaming the file back to LFN fiormat.

Exactly. As far as the QuickBASIC program is concerned, the batch files are black boxes. You could, say, use the batch file to store the rename command to be stored in a file, and then have some program running in Windows to watch for changes to that file and perform the rename operation.

VileRancour wrote:

Long answer - maybe, but you'd probably need a hard drive image to boot an actual DOS with third-party LFN support (or DOS 7.x, or Win9x). Might work, but it's not officially supported, and using a HDD image means you're still separated from your host file system anyway.

To clarify this part as well, it's not that hard to get files in and out of a disk image. You could use OSFMount, for instance.

Reply 15 of 15, by Wengier

User metadata
Rank Member
Rank
Member

This thread is one year old. But for the references of other users, I have already added long file name (LFN) support to DOSBox recently. It applies to both shell commands (e.g. DIR, CD, COPY) and Int21/AX=71xx functions for native LFN-aware DOS applications.

Reference thread in the forum with sources and Windows binaries:
Long File Name (LFN) support

Latest Windows binary + required DLLs, zipped:
http://bit.ly/12jANWF