Discussion Locked

CDROM Drive letter from Batchfile

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am try to launch a batch file from an autoplay CD. The batch file resides on the root of the cd. It creates the diretory I asked for but it says it can't find the files I want to copy. Here is what I have.....

ECHO ON

PATH=%CDROM%\:
pause

xcopy \files\*.* C:\EA-6B\

ATTRIB -R c:\EA-6B\*.*

What am I doing wrong ? Or better yet how do I get this to work ?

3 replies

by bigsparky

It looks like your Set Path statement is wiping out the old path, and unless xcopy and attrib are on the cd then it won't be able to find them. try setting the path string like this:
SET PATH=%PATH%;%CDROM%\:
I'm not sure the semi-colon after %path% is required but it shouldn't hurt.
Assumes of course that CDROM is defined

This discussion is closed to new replies.