Cannot get MSDOS2 prompt to start at A:\SOFARUN

صفحة 1/2
| 2

بواسطة Swami

Expert (91)

صورة Swami

05-09-2022, 03:58

I've been trying to bypass having to type "cd sofarun" everytime a boot MSDOS 2.2
What is wrong here in the AUTOEXEC.BAT FILE? One of those with "path should be right, isn't it? I get "A:\". If I type sr anyway, I get "invalid entry" or whatever. Here is AUTOEXEC.BAT contents. Thanks.:

INSTALL
SUB
SET PATH A:\SOFARUN\
PATH A:\SOFARUN\
SET PROMPT ON

Login أوregister لوضع تعليقاتك

بواسطة sdsnatcher73

Enlighted (4298)

صورة sdsnatcher73

05-09-2022, 05:02

You almost nailed it Wink check the wiki entry on PATH Environment.

SET PATH=A:\SOFARUN

should do the trick (no trailing \)

بواسطة megatron-uk

Resident (51)

صورة megatron-uk

05-09-2022, 09:24

It would also be just as easy to put the the following as the final line of the autoexec.bat file:

A:
CD \SOFARUN

Both options achieve a similar goal - that of having the commands in the A:\SOFARUN runnable without calling them via the full path. It's a question of whether being in \SOFARUN is sufficient, or whether you want the Sofarun commands to be permanently in the path and callable from anywhere.

بواسطة selios2000

Hero (595)

صورة selios2000

05-09-2022, 09:57

I only have one line:

A:\SOFARUN\SR /S

بواسطة gdx

Enlighted (6436)

صورة gdx

05-09-2022, 10:43

The best is:

path=A:\SOFARUN

because PATH allows access to the tools in the SOFARUN folder without open the folder.
You can add the line below to execute SOFARUN.

SR.COM /S

Otherwise enter sr on the keyboard.

بواسطة sdsnatcher73

Enlighted (4298)

صورة sdsnatcher73

05-09-2022, 17:04

At some point you may want to do other things with your MSX than play games. That is why adding it correctly to the PATH is indeed the best course of action. If you start using other tools the PATH can be extended using ; as a seperator:

SET PATH=A:\UTILS;A:\SOFARUN;A:\ROBOPLAY;A:\ADXP

بواسطة Swami

Expert (91)

صورة Swami

05-09-2022, 23:03

sdsnatcher73 wrote:

At some point you may want to do other things with your MSX than play games. That is why adding it correctly to the PATH is indeed the best course of action. If you start using other tools the PATH can be extended using ; as a seperator:

SET PATH=A:\UTILS;A:\SOFARUN;A:\ROBOPLAY;A:\ADXP

Granted I'm still new to this, but that never made sense to me. How can you boot to multiple directories at the same time (which is what it looks like). How does it know which directory your next file call is directed to. Is this some kind of "search all these directories for this file"?

I'm a little annoyed by all the tutorials I find online because they teach you to program, which I'm not yet interested in, but not commands like PATH vs SET PATH, CLOAD or DLOAD or DSK, etc. and other fundamental syntax. I've actually learned the basics a couple times before and then forget them over the course of a year or two, like a lot of things.

بواسطة gdx

Enlighted (6436)

صورة gdx

06-09-2022, 02:34

As I said above, PATH allows access to DOS commands located in the specified folders without having to open the corresponding folders. This also avoids indicating the path at each command entry) This saves us a lot of handling.

PS: According the wiki space is the separator and semicolon ( ; ) is to add path on the following line.

https://www.msx.org/wiki/PATH

بواسطة sdsnatcher73

Enlighted (4298)

صورة sdsnatcher73

06-09-2022, 06:13

@gdx PATH command is different from setting environment directly using SET PATH. In the environment variable the semicolon is used as seperator.

@Swami: a little explanation with some detail but not too much (so as not to overwhelm you). I hope it gives you the right level of insight you need at this moment.

The DOS2 exists of 3 layers. First layer (lowest level) the BDOS which is Basic Disk Operating System located in ROM. The second layer is MSXDOS2.SYS, which is the operating system and is loaded from disk into RAM. The last layer is COMMAND2.COM which is the command processor. It is also loaded from disk, prompts for input from the user, executes batch scripts and starts external programs (like SofaRun).

The command processor uses environment variables for its configuration and the PATH environment variable is its search path for executing commands. Commands can be internal to COMMAND2 (no searching required) but if it is given a command it does not know it will search the current working directory as well as all the directories specified in PATH.

بواسطة megatron-uk

Resident (51)

صورة megatron-uk

06-09-2022, 08:48

Think of PATH as a series of boxes that DOS looks in automatically every time you type a command. If a folder isnt listed in PATH you either need to be in that folder (present folder is always assumed to be in PATH), or you have to give the full path to a command each time you run it.

It's a standard part of the way most disk operating systems work across most platforms.

بواسطة gdx

Enlighted (6436)

صورة gdx

06-09-2022, 10:07

@sdsnatcher73, I'm talking about PATH not SET PATH. I don't see the point of using SET PATH for what Swami wants to do.

صفحة 1/2
| 2