griggs@pnet51.orb.mn.org (Griggs Nichols) (08/22/90)
Batch file aficionados, I need some help. I am trying to figure out a way to read/verify a VOL label on a disk in drive A, through a command line in a batch file. Currently I am using an IF...EXIST line which looks and verifies the existance of a dummy text file on the disk. Because this takes up precious room on the disk, I'd like to be able to just verify the label. BTW, I am using DOS 3.3. I know that MS-DOS 4.01 has the ability to recognize serial numbers for individual disks, and this problem is sort of addressed in the current PC/COMPUTING magazine. Thanks. Griggs UUCP: {amdahl!bungia, crash}!orbit!pnet51!griggs ARPA: crash!orbit!pnet51!griggs@nosc.mil INET: griggs@pnet51.orb.mn.org
cgordon@vpnet.chi.il.us (Gordon Hlavenka) (08/28/90)
>I am trying to figure out a way to read/verify a VOL label on a disk in >drive >A, through a command line in a batch file. > >Currently I am using an IF...EXIST line which looks and verifies the >existance >of a dummy text file on the disk. Because this takes up precious room on >the >disk, I'd like to be able to just verify the label. BTW, I am using DOS >3.3. Well, you're on the right track. Who says a "dummy" file has to take up disk space? Try this with DEBUG: C>debug -ndummy.fil rcx CX 0000 :0 /* Just to be sure! */ -w Writing 0000 bytes -q C> This will create a zero-byte file (called DUMMY.FIL) which takes up NO DISK SPACE. It consumes only a directory entry, which (assuming root) is allocated whether you use it or not. This file will give you the desired response to an IF EXIST line. ----------------------------------------------------- Gordon S. Hlavenka cgordon@vpnet.chi.il.us Disclaimer: I've fallen! And I can't get up! So how could I have expressed an opinion?