![]() |
Last Visit : never :: 2013-6-19 @ 01:33 am : Now | |||
FAQ |
Search |
Memberlist |
Usergroups |
|
Register |
Profile |
Messages |
Log in |
|
| Forum Index :: DOSBox General :: | |
DOSBox not finding batch files.
|
|
|---|---|
DOSBox not finding batch files. :: 2012-4-06 @ 09:43 pm
|
|
|
Andrew4096 Newbie Joined: 2012-04-06 Posts: 4 Location: Near San Jose, California |
I have DOSBox 0.73 running in Ubuntu 10.04.4 LTS (Linux), installed from the Canonical, Ltd. software repository. I'm running a few old DOS programs, with working installations copied from a Windows 98SE machine. To launch the applications, I have a collection of batch files, located in C:\BATCH. The default path in the /home/sysop/.dosbox/dosbox-0.74.conf file is C:\;C:\BATCH when DOSBox starts up. Some of the applications want their local directory added to the path, so my batch files add the desired path to %PATH%.
When I launch the application from C:\ by typing the batch file name without the ".BAT" extension, everything is fine. The application launches and runs as expected. When I exit the application, I end up in a subdirectory, not at C:\. If I now type the same batch file name without the ".BAT" extension, DOSBox responds: Illegal command: <name of command> The same batch file works perfectly in Windows 98 when typed in a command window. Here's a specific example. One of the programs I'm running is WordStar 6. The batch file to launch it is called WS6.BAT and it runs as expected when I launch it as "ws6" from C:\. When WordStar finishes, it ends up in C:\WS6\DOC. The modified PATH is now C:\WS6;C:\;C:\BATCH. When I type "ws6", DOSBox displays: Illegal command: ws6. When I type the complete batch file name, "ws6.bat", the batch file runs as before and launches WordStar again. This behavior is very un-DOS-like, not being able to run batch commands sans file name extension from an arbitrary sub-directory, even though the location of the batch file is in the current path. Is this a known bug in DOSBox? Am I missing something in my dosbox-0.74.conf file? I studied EricGG's DOSBox FAQ file, but didn't find anything helpful there.
EDIT: Saturday, April 07 2012 03:13:45 -- changed "DOSBox 0.74" to "DOSBox 0.73". Last edited by Andrew4096 on 2012-4-07 @ 10:15 am; edited 1 time in total |
|
|
Re: DOSBox not finding batch files. :: 2012-4-06 @ 10:32 pm
|
|
|
Dominus DOSBox Moderator Joined: 2002-10-03 Posts: 4689 Location: Vienna |
curios... _________________ Windows 3.1x guide for DOSBox 60 seconds guide to DOSBox DOSBox SVN snapshot for OS X (10.4-10.8 ppc/intel) codesigned for gatekeeper |
|
|
Re: DOSBox not finding batch files. :: 2012-4-07 @ 12:20 am
|
|
|
ripsaw8080 DOSBox Author Joined: 2006-04-25 Posts: 2913 |
I haven't reproduced the described problem by following your example:
1) Made a WS6.BAT file in C:\BATCH containing: Code: SET PATH=C:\WS6;%PATH%
CD \WS6\DOC 2) Changed path with "SET PATH=C:\;C:\BATCH" (might want to keep Z:\ in path, but whatever) 3) Executed "WS6" without extension at C:\> prompt, path was changed with prepended dir, current dir changed to C:\WS6\DOC 4) Executed "WS6" without extension at C:\WS6\DOC> prompt, batch ran yet again. DOSBox's shell only supports a subset of DOS commands, and not all supported commands have all features. Windows command shell script can differ from real DOS in a number of ways. Please post a batch file containing only those commands necessary to reproduce what you think is a problem. If you find that execution of a specific application is necessary to reproduce the problem, that points to a compatibility issue with that application. |
|
|
Re: DOSBox not finding batch files. :: 2012-4-07 @ 08:52 am
|
|
|
Andrew4096 Newbie Joined: 2012-04-06 Posts: 4 Location: Near San Jose, California |
I think I've figured out what's causing the problem.
* The ws.exe executable file is in a directory called WS6. DOSBox is attempting to "run" the directory WS6 instead of the batch file WS6. Since I'm in a Linux environment, I made sure that the executable property of the WS6 directory was cleared for owner, group and others, using chmod, but it makes no difference; DOSBox still attempts to execute directory WS6. If I rename WS6.BAT as WS9.BAT, it behaves the same way as I would expect it to in a real DOS environment and I can run the batch command WS9 from anywhere in the PATH without having to add ".BAT" to the command line. DOSBox must first test whether a command string can be matched with one or more file names in the PATH as it parses the PATH value from left to right. (In my example, it should look for "WS6" first in C:\WS6, then in C:\ and finally in C:\BATCH. It must attempt to run partial matches in each path exactly in the following order (See http://support.microsoft.com/kb/35284): 1. COM 2. EXE 3. BAT In other words, it needs to first look in C:\WS6 for WS6.COM, WS6.EXE and WS6.BAT; then look in C:\ for WS6.COM, WS6.EXE and WS6.BAT; finally, look in C:\BATCH for WS6.COM, WS6.EXE and WS6.BAT.. Any directory matching the name "WS6" in those three places must be ignored and DOSBox should not even attempt to run it. Once DOSBox has exhausted the search for EXE, COM and BAT possibilities and failed to make a match, it should report "Bad command or file name". I tried repeating your experiment with a simple directory structure that looks like this: Code: C:\
| + - WS8 | + - DOC and running a batch file in C:\BATCH called "WS8.BAT" that looks like this: Code: SET PATH=C:\;C:\BATCH
SET PATH=C:\WS8;%PATH% CD \WS8\DOC It runs fine the first time from C:\, but fails when one attempts to run it a second time from C:\WS8\DOC. See the attached screenshot. Note that DOSBox reports "Illegal command: ws8.", with a trailing period. I don't know if it is saying it is trying to execute an entity called "ws8." or if the period was simply added for style in the screen message. While in C:\WS8\DOC I can reset the PATH value to C:\;C:\BATCH and type "ws8", and it still fails, telling me that it finds the directory called "WS8" in C:\, tries to execute it and gives up. This is definitely a DOSBox bug that should be brought to the attention of the developers, though I'm not sure how to do it. |
|
|
Re: DOSBox not finding batch files. :: 2012-4-07 @ 09:11 am
|
|
|
ripsaw8080 DOSBox Author Joined: 2006-04-25 Posts: 2913 |
As you can see in the attached screenshot, the problem is not occuring with my test on the official Win32 release of DOSBox 0.74, so perhaps there is a platform issue. Maybe others on Linux platforms can try this simple batch test.
Your initial post said you're using 0.74, but your screenshot shows 0.73, so please ensure that you're using 0.74, although I don't think it will fix whatever the problem is. |
|
|
Re: DOSBox not finding batch files. :: 2012-4-07 @ 09:59 am
|
|
|
Andrew4096 Newbie Joined: 2012-04-06 Posts: 4 Location: Near San Jose, California |
ripsaw8080 wrote: Your initial post said you're using 0.74, but your screenshot shows 0.73, so please ensure that you're using 0.74, although I don't think it will fix whatever the problem is.
Oops, you're correct. I just installed 0.74-1 from the Debian "Squeeze" repository (Ubuntu has 0.73) and the results are the same. This could, indeed, be a platform related issue. Maybe DOSBox isn't detecting directories properly when running on Linux, thinking that they're just another executable file. |
|
|
Re: DOSBox not finding batch files. :: 2012-4-07 @ 10:54 am
|
|
|
Qbix DOSBox Author Joined: 2002-11-27 Posts: 9430 Location: Fryslan |
I'll take a look. _________________ Water flows down the stream How to ask questions the smart way! |
|
|
Re: DOSBox not finding batch files. :: 2012-4-07 @ 12:20 pm
|
|
|
Qbix DOSBox Author Joined: 2002-11-27 Posts: 9430 Location: Fryslan |
I don't have 0.74 installed on this linux machine, but I can confirm the problem in 0.73, but it works in the current SVN.
It's either fixed or depends on the compiler used. _________________ Water flows down the stream How to ask questions the smart way! |
|
|
|
page 1 of 1
|
|
| All times are GMT |
| Moderate |
|---|
| Quick Reply & Options | |
|---|---|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum |
|
2002-2003 zetafleet.dom.