Computer Hope

Microsoft => Microsoft DOS => Topic started by: Jazz_Lover on December 08, 2011, 12:55:10 AM

Title: Copy files from a CD
Post by: Jazz_Lover on December 08, 2011, 12:55:10 AM
This probably has been beaten to death, but nothing is working for me.  I am trying to create a CD that contains some files I want a friend to get a copy of.  As a courtesy, I am attempting to create a batch file that will automatically copy the files from the CD to the folders on the hard drive I'd like them in on my friends computer.  I don't have a problem getting the batch to run automatically or creating the folders, but I cannot get the files to copy from the CD.  This friend has more than 1 CD drive and I don't know which drive will be used. I'd like to be able to use this multiple times as an installation utility.
I have tried some of the commands I have seen, but none of them work.  Can someone please help?
Title: Re: Copy files from a CD
Post by: gpl on December 08, 2011, 01:45:29 AM
If you are running the batch from the cd, then %0 has the path to the batch, just filter out the drive and path:

Code: [Select]
%~dp0and thats the source for your copy
Title: Re: Copy files from a CD
Post by: Squashman on December 08, 2011, 05:47:38 AM
This probably has been beaten to death, but nothing is working for me. 
Yeah, Salmon_Trout just covered this 4 days ago.
http://www.computerhope.com/forum/index.php/topic,125819.msg822623.html#msg822623
Title: Re: Copy files from a CD
Post by: Jazz_Lover on December 09, 2011, 12:18:50 AM
Still lost gpl.  What do you mean? 
Title: Re: Copy files from a CD
Post by: Squashman on December 09, 2011, 05:51:58 AM
Did you bother to read the link I posted.
Title: Re: Copy files from a CD
Post by: Jazz_Lover on December 09, 2011, 07:06:50 PM
Yes, I "looked" at that post.  Didn't see that exact command or how I could possibly use it.
If it's too much trouble for an expert like you - don't bother.
Sorry I was so much trouble. Seriously.
Title: Re: Copy files from a CD
Post by: Squashman on December 09, 2011, 07:19:58 PM
Yes, I "looked" at that post.  Didn't see that exact command or how I could possibly use it.
If it's too much trouble for an expert like you - don't bother.
Sorry I was so much trouble. Seriously.
The variable you need to use was given to by gpl's first post and had all the examples in the link I provided to you.
Put this code into a batch file and execute it.
Code: [Select]
@echo off
echo %~dp0  is the Path to my batch file.
echo %0  is my batch file name.
Title: Re: Copy files from a CD
Post by: Jazz_Lover on December 11, 2011, 01:35:05 PM
Thank you all for your time and assistance.  Moderator, please close this post.