Computing.Net > Forums > Disk Operating System > CD Label

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

CD Label

Reply to Message Icon

Name: S A
Date: October 30, 2003 at 08:19:23 Pacific
OS: XP
CPU/Ram: P4, 1.5GB
Comment:

I am trying to create a batch file that will check the volume of the CD I put in the workstation and then execute another batch file based based upon that CD volume name. Any suggestions?



Sponsored Link
Ads by Google

Response Number 1
Name: bitbyte
Date: October 30, 2003 at 11:19:33 Pacific
Reply:

hope this helps

it assumes the cd drive is e:
correct cd label is cd1 (its case sensitive)
--------------------------
@echo off
vol e:|find "cd1" > NUL
if errorlevel 1 goto wrongcd
echo cd ok
goto end

:wrongcd
echo cd not ok

:end


0

Response Number 2
Name: S A
Date: October 30, 2003 at 11:28:08 Pacific
Reply:

Thank you very much. It worked great! I do not mean to trouble you but what does the "> NUL" do?


0

Response Number 3
Name: bitbyte
Date: October 30, 2003 at 11:53:20 Pacific
Reply:


it sends the output of FIND to the NUL device instead of the standart output (screen). NUL is a special device, data you send there will be not stored in any way


0

Response Number 4
Name: S A
Date: October 30, 2003 at 12:08:16 Pacific
Reply:

Gotcha! So it is like a temporary variable? If I wanted the value stored to a true variable, what would be the syntax?

Thanks alot for your help. I am a bit slow picking this stuff up.


0

Response Number 5
Name: daMANiack
Date: November 9, 2003 at 12:27:41 Pacific
Reply:

Hi,

Very handy, but how can I search my devices looking for a specific Volume Label as not all systems would have their CD-Rom using the same device letter.

Cheerz


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

How to read data from txt... USB 2.0 in DOS using USBA...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: CD Label

CD Label for dos boot cd??? www.computing.net/answers/dos/cd-label-for-dos-boot-cd/15003.html

CD/DVD-ROM install in DOS www.computing.net/answers/dos/cddvdrom-install-in-dos/8856.html

MS-DOS install boot cd-r www.computing.net/answers/dos/msdos-install-boot-cdr/12306.html