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

Reply via email to