• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

quick DOS question

tony4704

Senior member
What variable do I use for getting the drive letter off the current CDROM the batch program itself is running off of? Thanks.
 
I'm looking to do a xcopy command that copies files form the CD drive to the computer. However I want this to work across any CD drive letter (D, E, F, etc). What I want to know is if there is some type of environmental variable that says what the current CD drive is. (i.e. something similar to what %homepath% does when it lists the current user). Thanks.
 
a 2 second google search for "batch file determine cd drive letter" turned up good results. here is a series of batch files that might contain examples showing you how to solve your problem. this one is supposed to be able to determine which drive letter is assigned to the cd-rom drive. google ftw.
 
Look at the contents of the config files on a DOS boot disk (official versions).. either the autoexec.bat or config.sys file's have variables and such that assign the drive letters to the cdrom driver file when it loads.. You may get some ideas from this..
 
Why is everyone making such a big deal out of this? Just run 'xcopy \directory\file destination'. Since xcopy is running from the CD all of the paths will be relative to that drive.
 
Back
Top