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
roy@cs.umn.edu (Roy M. Silvernail) (08/22/90)
griggs@pnet51.orb.mn.org (Griggs Nichols) writes: > 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 existanc > 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 Do you want to do something like if vollabel == "thislabl" then dosomething I think I can whip up a program to do that. Batch files, though, can usually only process the errorlevel returned from a program. I'm still working on setting parent environment variables, so it'll be a week or more before I can do that. (a simple one could be written after work tonight) -- Roy M. Silvernail | #include <stdio.h> | Does virtual now available at: | main(){ | reality need cybrspc!roy@cs.umn.edu | float x=1; | swap space? (cyberspace... be here!)| printf("Just my $%.2f.\n",x/50);} | -- me
fisher@sc2a.unige.ch (Markus Fischer) (08/23/90)
In article <3078@orbit.cts.com>, griggs@pnet51.orb.mn.org (Griggs Nichols) writes: > 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. It would be nice to read the volume into some variable, but then DOS's batch language is so limited to start with, that I wouldn't know what to do with it. The testing of the volume is much simpler, and it's funny enough that a friend just asked me to write such a program. Here it is, feel free to do anything you want with it (yes, even a porting to basic is allowed :-). ----- cut here ----- /* * volis.c : checks for correct volume name * * usage: volis [-v] [D:] "volume name" * returns: 0 if volume of drive D: (dflt: current) is the same. * (case sensitive comparaison) * 1 if volume exists and is different * 2 if volume is not set (exept "volume name" is ".") * 3 on error or help message * notes: the special name "." means `no volume' * the -v (verbose) flag produces a short message * * Writen for TC 1.5 by Markus Fischer, Geneva, August 1990 */ #include <stdlib.h> #include <stdio.h> #include <string.h> #include <dir.h> char verbose = 0; char drive[] = "?:\\*.*"; struct ffblk ffblk; #define LABEL ffblk.ff_name #define FA_LABEL 0x08 /* file attribute for volume label */ void done(int el) { if (verbose) switch (el) { case 0: printf("(0) volume is ok\n"); break; case 1: printf("(1) volume in drive %.2s is %s\n", drive, LABEL); break; case 2: printf("(2) volume not set in drive %.2s\n", drive); break; case 3: printf("(3) can't read from %.2s\n", drive); break; default: printf("bug!\n"); } exit(el); } void main (int argc, char *argv[]) { /* check for verbose flag */ if (argc>1 && strcmp("-v", argv[1]) == 0) { verbose = 1; argc--; argv++; } /* check for valid disk name */ if (argc>1 && argv[1][1]==':' && argv[1][2]=='\0') { drive[0] = argv[1][0]; argc--; argv++; } else { drive[0] = (char) getdisk() + 'A'; } /* print usage */ if (argc==1) { puts("usage: volis [-v] [D:] \"volume name\""); puts("returns error level 0 if volume of drive D: compares ok"); puts(" 1 if volume of drive D: is different"); puts(" 2 if volume is not set"); puts(" 3 on error"); puts(" the special name \".\" means `no volume name'"); puts(" the -v (verbose) flag produces a short message"); puts("Markus Fischer, Geneva, August 1990"); exit(3); } /* trying to find the label */ if (findfirst(drive, &ffblk, FA_LABEL)) { /* unsucessful */ strcpy(drive+3, "NUL"); if (fopen(drive, "r") != NULL) /* drive exists */ if (strcmp(".", argv[1]) == 0) done(0); /* ok, no volume */ else done(2); /* volume not found */ else done(3); /* error */ } else { /* get rid of the extension sepeartor at LABEL[8] */ if (strlen(LABEL)>8) { register char *c; for (c=LABEL+8; *c=c[1]; c++); } done(strcmp(LABEL, argv[1]) != 0); } } ----- end ----- For convinience, I enclose the uuencoded *.com file ----- cut here ----- section 1 of uuencode 4.02 of file volis.com by R.E.M. begin 644 volis.com M^XS*+HD6@0*T,,TABRX"`(L>+`".VJ,M&XP&*QN)'B<;B2Y#&\<&,1O__^@%6 M`<0^)1N+QXO8N?]_)H$].#=U&2:+50*`^CUU$(#FW_\&,1N`_EEU!/\&,1OR( MKN-G0R8X!776@,V`]]F)#B4;N0$`T^.#PPB!X_C_B1XI&P[_%O`?C-HKZHL^* M;!^!_P`!<P>_``&)/FP?@<=Z('(H`SX"'W(BL033[T<[[W(9@SYL'P!T!X,^0 M`A\`=0Z_`!`[[W<'B_WK`^FD`(O?`]J)'CL;B1X_&Z$K&RO8CL"T2E?-(5_3% MYX[2B^?H-@_H'A`SP"Z.!H$"O_X?N7H@*\_SJO\6]!__-B,;_S8A&_\V'QOHU MX@!0Z)L#+HX>@0+H,P`._Q;R'XOLM$R*1@+-(;D.`)"Z[QKK/QZX`#7-(8D>U M&QN,!AT;N``EC,J.VKHJ`LTA'\,>N``EQ18;&\TA'\/'!C$;``#+P[1`NP(`H MS2'#N1X`D+K]&BZ.'H$"Z.G_N`,`4.B3_P``58OL@#Y&&P!T7(M&!#T#`'=," MB]C1XR[_IYX"I@*P`L,"T@*X3AM0Z#H,6>LYN!P@4+A'&U"X8!M0Z"@,B^7K\ M)KA'&U"X@!M0Z!D,B^7K%[A'&U"XHAM0Z`H,B^7K"+B\&U#H_PM9_W8$Z,`"/ M65W#5E=5B^R+?@J#?@@!?AO_=0*XPAM0Z#X0B^4+P'4+Q@9&&P'_3@B#QP*#Q M?@@!?B*+70*`?P$Z=1F+70*`?P(`=1"+70**!Z)'&_]."(/'`NL)Z,\!@,!!@ MHD<;@WX(`75(N,4;4.B!#5FXZAM0Z'D-6;@C'%#H<0U9N%T<4.AI#5FXB1Q0Z MZ&$-6;BI'%#H60U9N-@<4.A1#5FX"AU0Z$D-6;@#`%#H%@)9N`@`4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&EN(&1R:79E("4N,G,@:7,@)7,*`"@R*2!V;VQU;64@' M;F]T('-E="!I;B!D<FEV92`E+C)S"@`H,RD@8V%N)W0@<F5A9"!F<F]M("4ND M,G,*`&)U9R$*`"UV`'5S86=E.B!V;VQI<R!;+79=(%M$.ET@(G9O;'5M92!N@ M86UE(@!R971U<FYS(&5R<F]R(&QE=F5L("`P(&EF('9O;'5M92!O9B!D<FEV; M92!$.B!C;VUP87)E<R!O:P`@("`@("`@("`@("`@("`@("`@("`Q(&EF('9OF M;'5M92!O9B!D<FEV92!$.B!I<R!D:69F97)E;G0`("`@("`@("`@("`@("`@J M("`@("`@,B!I9B!V;VQU;64@:7,@;F]T('-E=``@("`@("`@("`@("`@("`@9 M("`@("`S(&]N(&5R<F]R`"`@('1H92!S<&5C:6%L(&YA;64@(BXB(&UE86YS] M(&!N;R!V;VQU;64@;F%M92<`("`@=&AE("UV("AV97)B;W-E*2!F;&%G('!RQ M;V1U8V5S(&$@<VAO<G0@;65S<V%G90!-87)K=7,@1FES8VAE<BP@1V5N979A* M+"!!=6=U<W0@,3DY,`!.54P`<@`N````<')I;G1F(#H@9FQO871I;F<@<&]I? M;G0@9F]R;6%T<R!N;W0@;&EN:V5D#0IS8V%N9B`Z(&9L;V%T:6YG('!O:6YTT M(&9O<FUA=',@;F]T(&QI;FME9`T*`*X%K@6N!0``"0(`````````````EAT`] M``H"`0```````````*8=```"`@(```````````"V'0``0P(#````````````] MQAT``$("!````````````-8=`````/\```````````#F'0````#_````````D M````]AT`````_P````````````8>`````/\````````````6'@````#_````! M````````)AX`````_P```````````#8>`````/\```````````!&'@````#_% M````````````5AX`````_P```````````&8>`````/\```````````!V'@``" M``#_````````````AAX`````_P```````````)8>`````/\```````````"F= M'@````#_````````````MAX`````_P```````````,8>`2`"(`(@!*`"H/__F M_____________________________________P``__\``````!,"`@0%!@@(2 M"!05!1/_%@41`O________________\%!?____________________\/__\"% M_P______$___`@(%#P+___\3____________________$_\```!@'V`?#0``< M`````!!435``+B0D)```*&YU;&PI`#`Q,C,T-38W.#E!0D-$148`$Q,!$Q03% M$Q,3`@`3`P03"`4%!04%!04%!1,3$Q,3$Q,3$Q,3#A8.!Q,3$Q,3%1,3$Q,3N M$Q,3$PP3$Q,3$Q,3$Q,3#PD.#@X'"1,3!A,1"@T3$Q`3"Q,3#!,3$Q,3$Q,`Z 6P);`F("D@6;!9L%FP4%) `` end sum -r/size 24845/11138 section (from "begin" to "end") sum -r/size 15304/7934 entire input file ----- end ----- NOTE: I guarantee that the source file in this posting is the one I used to produce the executable, without any changes, and that to my knowledge, no virus has attached itself to it. On the other hand I will in no circomstances be liable for any damage caused by this program. Enjoy! Markus Fischer -|--|--|--|--|--|--I Department of Anthropology -|--|--|--|--|--|--|-(#)-I University of Geneva -|--|--|--|--|--|--|--|--|-(#)-|-(#)(#)(_)-I CH-1227 Carouge (GE) -&-(_)-|--|--|-(#)-&--|-(#)(#)(_)(#)-&-(_)(#)-I Switzerland -|--|--|--|--|-(#)(_)-|-(_)(_)(_)(#)-I black (#) to kill ! --|--|-(#)(_)(_)(_)(#)(#)(_)(_) fisher@sc2a.unige.ch =+==+==+==+==+==+==+==+==+==+==+==+==+==+==+=(#)=+ fisher@cgeuge52.bitnet
h_esben@vaxa.cc.uwa.oz.au (08/24/90)
In article <3078@orbit.cts.com>, griggs@pnet51.orb.mn.org (Griggs Nichols) writes: > 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. > Not an answer to your question, but an alternative solution. Try using the following command at the DOS prompt : A:> REM > filename.ext Then use IF EXIST filename.txt to test for the existence of the file. The above method will create a directory entry only on the disk, and does not take up any room on the disk. =================================================================== Henry Esbenshade email: h_esben%vaxa.uwa.oz phone: 09 380 3435 fax: 09 381 6427 Department of Geography, University of Western Australia Nedlands, Western Australia, 6009, Australia
ts@uwasa.fi (Timo Salmi LASK) (08/24/90)
>In article <3078@orbit.cts.com>, griggs@pnet51.orb.mn.org (Griggs Nichols) writes: >> 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. Not easy, but possible. You have to write eg a Turbo Pascal (or C) program to read the volume label, and then have the program set an environment variable to contain the label name. Neither of these programming tasks is trivial, but the principle is valid. I know this from experience with a remotely similar programming dilemma I had to solve quite some time ago. Of course there might be other solutions as well, but I can't figure out any other at the moment. If you happen to be a novice at writing batch files, you may find some useful general tricks of batch programming in (/pc/ts/) tsbat21.arc available by anonymous ftp from our site. ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun