VOGONS

Common searches


path problem

Topic actions

First post, by emanresu

User metadata

I am trying to run an executable file that is not in the current subdirectory but
is in the path. The following screenshot is what displays upon starting DOSBox:

scrn1.png

The drives mounted in the [autoexec] section of the config file do so properly. The path and other environment variables are set in [autoexec]. Set reveals:

scrn2.png

In the bottom portion of this screenshot, I try to run a program called DBX. It is in C:\UTIL, which is contained in the path. As you can see, I receive a very strange response.

If I change to the UTIL subdirectory on C: before running DBX, it works. In addition, if I specify the full path to DBX in the command (without first changing to the UTIL subdirectory), it will also run.

Here are the contents of [autoexec]:

@ECHO OFF

mount c: /var/lib/dosemu/dos622
mount h: /home/bill
mount p: /home/public
mount v: /home/devel

set path=z:\;c:\util;v:\;v:\blinker3;v:\CLIP53\BIN

set CCPSpath=v:\ccps\
set HostName=bill

SET TMP=C:\temp
SET TEMP=C:\TEMP

set bpath=v:\brief\macros;v:\brief\dbrief
set bhelp=v:\brief\help
set bfile=v:\brief\state.rst
set bcprg="!clipper %%s /a /m /n /w"
set bpackages=default:s;txt:wp;prg:r
set bflags=-B1i120l512Mr -mWJM -mrestore -Dega
set btmp=v:\brief\tmp

v:

SET PRINTERS=v:\VS_905\
SET MURPHY=v:\VS_905\

Any ideas?

Reply 2 of 7, by Guest

User metadata

Hold it....should the path lines be located on the mount points? In other words if you mount:

C: C:\DOS

And then set:

PATH=Z:\utils

It should not work...because Z: isn't mounted. Also if you use:

PATH:C:\GAMES\PQ2

it should only work if C:\DOS\GAMES\PQ2 exists right? Since C = C:\dos? I could be talking out of my ass but thats how I see it...

Reply 4 of 7, by Guest

User metadata
Anonymous wrote:
Hold it....should the path lines be located on the mount points? In other words if you mount: […]
Show full quote

Hold it....should the path lines be located on the mount points? In other words if you mount:

C: C:\DOS

And then set:

PATH=Z:\utils

It should not work...because Z: isn't mounted. Also if you use:

PATH:C:\GAMES\PQ2

it should only work if C:\DOS\GAMES\PQ2 exists right? Since C = C:\dos? I could be talking out of my ass but thats how I see it...

I am not sure I understand what you are saying. However, taking drive Z out of the set path statement makes no difference. Correct me if I am wrong, but shouldn't drive Z be first in the path so that it gets searched first?

emanresu

Reply 6 of 7, by avatar_58

User metadata
Rank Oldbie
Rank
Oldbie

I'm very sorry...but what I want to say is hard to explain.... 😅 So forgive me if I loose you.

What I am saying is that you have "C:\Util" in your path, would that not indicate that /var/lib/dosemu/dos622/util should exist? Since C:\ = /var/lib/dosemu/dos622 then the path will start from there and look for util.

Am I correct?

Reply 7 of 7, by Guest

User metadata

Yes, you are correct. Indeed, C:\UTIL does exist. ...

I figured it out!

There exists a C:\UTIL\DBX subdirectory as well as a C:\UTIL\DBX.EXE file. I renamed the DBX subdirectory to DBX.DIR. Now, running DBX.EXE from some other subdirectory other than C:\UTIL works.

This looks like a bug in DOSBox.

Workaround:
Avoid subdirectories and executables with the same filename in the same subdirectory. Rename the subdirectory to something else. It is enough to simply add an extension to the subdirectory name.

Before directory listing snippit:

Directory of C:\UTIL\.
DBX <DIR> ...
DBX EXE ...
...

Running DBX from another subdirectory does NOT work.

After directory listing snippit:

Directory of C:\UTIL\.
DBX DIR <DIR> ...
DBX EXE ...
...

Running DBX from another subdirectory DOES work.

emanresu