Batch File Help - Copy

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
lloydie11
Posts: 1
Joined: 11 Apr 2013 04:06

Batch File Help - Copy

#1 Post by lloydie11 » 11 Apr 2013 04:09

Hi,

I need to create a batch file which acts on user input and am not having any joy.

Basically, it need's to prompt for Drive letters to use, so it can then copy from the first paramenter (dl) to the second (bl)

The script i have done is below but not having much luck with it, am i going wrong somewhere?


@echo off

:GETINPUT
set /p dl=Drive letter of OS?:
set /p bl=Drive letter of backup location?:

copy "%dl%"\windows\csc\*.* "%bl%"\FilesCacheBackup\CSC

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Batch File Help - Copy

#2 Post by Squashman » 11 Apr 2013 05:39

You sure someone is going to enter in the COLON after the drive letter?
Don't put just your variables in quotes. Put the whole path in quotes.

Post Reply