First post, by fxm
Is there a way to define a floppy as 'optional' [or defer mounting] so that
MOUNT A A:\ -t floppy
doesn't trigger an error at -conf time if no diskette is present?
I hope I'm not missing something obvious.
Is there a way to define a floppy as 'optional' [or defer mounting] so that
MOUNT A A:\ -t floppy
doesn't trigger an error at -conf time if no diskette is present?
I hope I'm not missing something obvious.
Hi fxm,
I've created an autoexec.bat and wrote the mount command into it.
In the autoexec section in the conf file I mount the right drive and execute the autoexec.bat. So I get no errors by mounting the drive A: while there is no floppy inserted.
Vince
wrote:In the autoexec section in the conf file I mount the right drive and execute the autoexec.bat.
This
MOUNT A A:\ -t floppy
is the entry I already had in the [Autoexec] section of the DOSBox -conf for this app.
If there is a diskette in the floppy drive, the program starts normally.
If there is no diskette in the drive, I have to hit <ENTER> to dismiss three 'NOT FOUND" error messages in a row before the program starts.
Note: the drive in question isn't internal, it is an external floppy drive on a USB port.
If a floppy is needed can you just mount a folder as your floppy? That way a "floppy" would always be there to mount.
wrote:can you just mount a folder as your floppy?
Yes, but then the user has to find and copy the file(s) from the diskette to that folder [or I have to write a script to do it - which involves knowing the path(s) and the filename(s) in advance].
Leaving a diskette in the drive all the time is a lot less effort.
I was sort of hoping that something like
MOUNT A A: -t floppy
or
MOUNT A A -t floppy
or
MOUNT A A:\ -d -t floppy
could be made to mount the device without trying to access the diskette at -conf/autoexec time (avoiding nuisance messages when the user either forgets to put in the diskette before launching the app or knows that the diskette won't be needed for the current session).
I don't get why you want to mount a drive without a disk in it. There are no files to read and no media to write to.
If you just want to keep the mounting command in the autoexec you can add REM in front of the line so it won't be processed. Then you can remove REM when you plan to access the drive.
Another option is placing a batch file at the root of the mounted C drive to access from the prompt.
C:\>FLOPPY.BAT
@ECHO OFF
Z:
MOUNT -u A
ECHO Mount floppy?
CHOICE /C
IF ERRORLEVEL 2 GOTO NO
IF ERRORLEVEL 1 GOTO YES
:YES
ECHO.
MOUNT A A:\ -t floppy
:NO
ECHO.
C:
wrote:why you want to mount a drive without a disk in it.
I would like the user to have the same experience with DOSBox that she had with her existing system. That is, she starts the program the same way each time and does not have to insert a diskette unless/until the program needs it. No error messages, no prompts, no editing of files she never heard of.
Hey fxm,
Here is what I mean:
-My Dosbox path is C:\DOSBOXM5
-In this folder I've the folder DOS
-In the folder DOS I've created an Autoexec.bat
The Autoexec.bat:
--------------------------
VER SET 6 22
MOUNT A A:\ -t floppy
--------------------------
-In the Autoexec section in the dosbox.conf is:
-----------------------------------------------------
@mount c c:\dosboxm5\dos
@mount d c:\dosboxm5\games -freesize 1013
@mount e c:\dosboxm5\data
@c:
@cls
@autoexec.bat
-----------------------------------------------------
With this the drive A: is mounted even if there is no disk in it!
Hope that'll help you!
Vince
wrote:Here is what I mean: […]
Here is what I mean:
The Autoexec.bat:
--------------------------
MOUNT A A:\ -t floppy
---------------------------In the Autoexec section in the dosbox.conf is:
-----------------------------------------------------
@autoexec.bat
-----------------------------------------------------With this the drive A: is mounted even if there is no disk in it!
Thank you. I understood what you meant from your first post.
The problem is that you appear to think that putting
MOUNT A ...
in the autoexec [or any .bat file for that matter] will suppress errors which otherwise would occur when there is no diskette in the drive.
It won't.
I take your word that on your system a MOUNT with no diskette in the drive generates no errors but I think you will find that moving the MOUNT to the -conf file from the autoxec.bat won't change your good result.
My bad result isn't changed by moving the MOUNT either: I get three annoying error messages every time. I suspect that the disparity in our outcomes is the result of some difference(s) in the driver(s) - not in the placement of the command.
Unfortunately that leaves me with my original problem: I haven't found a way to silently MOUNT the USB floppy drive I'm using when no diskette is in the drive.
Here is one workaround that you could try. Make a batch file to start DOSBox with one of two different conf files based on whether or not a disk is in the a: drive. Modify to suit your paths.
CMD/F/CDIR/ADH/W a: |FIND.EXE ":\" 2>nul
IF errorlevel=1 GOTO NODISK
"C:\Program Files (x86)\DOSBox-0.74\dosbox.exe" -conf dosboxa.conf
GOTO END
:NODISK
ECHO nodisk >> nodisk.tmp
"C:\Program Files (x86)\DOSBox-0.74\dosbox.exe" -conf dosbox.conf
:END
In the dosboxa.conf, add your mounting for the floppy. In dosbox.conf exclude mounting the floppy.
The above batch file will also create a temp file named "nodisk.tmp", which can be used to check if a disk is present in another batch file executed within DOSBox without DOSBox accessing the floppy drive. At a point that it requires the disk you can use something like this in the batch run within DOSBox:
@ECHO off
cls
IF EXIST nodisk.tmp GOTO NODISKMessage
IF NOT EXIST nodisk.tmp GOTO MOUNTA
:NODISKMessage
ECHO Disk not found. Please insert disk in A: and then
pause
:MOUNTA
mount a a:\ -t floppy
DEL nodisk.tmp
This would prompt the user to insert a disk before DOSBox accesses the floppy drive.
This would let the user to run DOSBox without the no disk nag and prompt them to insert a disk before it needs what is on the floppy. A little convoluted, but it should work.