WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

CD-ROM Drives

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How do I determine CD-ROM Drive Letter ?

Keywords:    CD ROM CDROM CD-ROM

Question:

Using WB, I need to determine the Drive Letter being used for a giving PC's CD-ROM Drive. Taking that info and using it in a WB FileCopy or Run Command.

OR can I take the CD's Label Name & use UNC type naming convention in a WB FileCopy or Run Commands? ?

Answer:

Option #1:
	cddrives=DiskScan(8)
	cdCount=ItemCount(cddrives,@tab)
	Message("NUmber of CD DRives",cdcount)

	for xx=1 to cddount
	   thiscd=ItemExtract(xx,cddrives,@tab)
	   Message(xx,thiscd)
	next

Option #2. If a compiled WinBatch script is running from the CD-ROM, a better way is...
	myexe=WinExeName("")
	root=strsub(myexe,1,3)
	Message("CD ROOT",root)

Article ID:   W13205
Filename:   Determine CD-Rom Drive.txt
File Created: 1999:04:15:16:52:28
Last Updated: 1999:04:15:16:52:28