Right now I have something like this going on.
A: is the floppy bootup image.
B: could be a floppy so I don't want that to be probed
Y: is the drive letter assigned to the CD that I booted from.
Z: is a ramdrive.
for %%d in (c d e f g h i j k l m n o p q r s t u v w x) do (
if exist %%d:\mygame\ (
cls
echo.
echo.
echo.
echo A previous installation of MYGAME was found on drive %%d:
choice /B /N /C:YN /T:Y,10 Should I run the game from this location
[recommended]
if not errorlevel 2 (
swsubst %progdisk% %%d:\mygame\
goto finish
)
)
)
REM either didn't find an installation, or didn't want to use it
set progdisk = z:
copy Y:\mygame\*.* %progdisk% > nul
:finish
%progdisk%
rungame
FreeDOS doesn't seem to like the compound IF very much. Thoughts
appreciated.
Bruce
On Tue, Nov 27, 2012 at 1:49 PM, Bernd Blaauw <bbla...@home.nl> wrote:
> Op 27-11-2012 6:45, bruce.bowman tds.net schreef:
>
> > In fact I am essentially done with my project but still want something I
> > can throw in a batch file to probe for writeable drive letters so I can
> > give the user an opportunity to save a game and resume later (like they
> > used to).
>
> DOS kernels only assign driveletters to FAT filesystems. For (emulated?)
> floppy drives A: and B: get assigned, thus C: till Z: get assigned to
> everything else.
>
> A FAT filesystem contains the NUL blockdevice, making it easy to test:
>
> @echo off
> IF EXIST C:\NUL echo Driveletter C: points to a FAT filesystem.
>
> Testing if you can store files on the drive is a different issue
> altogether, as it involves:
> * checking if the drive isn't full yet
> * checking if the drive isn't write-protected (read-only)
> * checking if there's enough free diskspace
>
> Bernd
>
>
> ------------------------------------------------------------------------------
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or applications!
> http://p.sf.net/sfu/zoho_dev2dev_nov
> _______________________________________________
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user
>
--
Sent from my meager, humble desktop computer.
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel:
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user