PDA

View Full Version : User input command for batch files??


Bob Leny
12-31-2006, 07:30 PM
Hello,

Any one here good with batch files? I need to have the file stop and wait for the users input. In this case, it need not be extensive, I simply need to be able to tell it a file name, and then have it execute a line of code using the file name entered by the user.

How do I do this?

Thanks!

Roelf
01-01-2007, 07:57 PM
use the set statement with the /P option:

set /P parameter=prompt

f.e.:

set /P theuserinput="Enter the filename: "

after this command, you can use the %theuserinput% in the command for the filename.

f.e.

del %theuserinput%