Click to See Complete Forum and Search --> : Help with bat files


waheedrafiq
October 25th, 2005, 04:33 AM
I am trying to create a bat file that ask user for input of a drive letter example F and then copys some files over to that drive letter




Can someone help me in this a bit lost

mmetzger
October 25th, 2005, 08:36 AM
Do you want this via a command line argument or via an actual question? Here's the command-line argument. Performing a question takes a little more work and depends on the environment...

Command-line argument:

@echo off

echo Copying files from %1
copy myfile.* %1

PeejAvery
October 25th, 2005, 01:41 PM
I am trying to create a bat file that ask user for input of a drive letter example F and then copys some files over to that drive letter
Unless you have the older versions of DOS with CHOICE.EXE, you cannot do it with a BAT file. 2000 and XP does not include that file. It is CHOICE.EXE which pauses and waits for input and then interprets it.

waheedrafiq
October 26th, 2005, 03:34 PM
sorted it

in 2000 and XP MS have replace choice.exe with a command know as


set

PeejAvery
October 26th, 2005, 04:56 PM
in 2000 and XP MS have replace choice.exe with a command know as ... set
No. Actually SET is a command that has been in existence since DOS was created. SET just declares values. CHOICE is what can prompt for user input.