I'm in a class and we discussed what set /p does, but I wasn't paying close attention, I was wondering if anyone could explain to me what set /p does and an example of how I can use it in a batch file for dos

Recommended Answers

All 3 Replies

By the way which is a good website for learning tutorials about batch files for linux and windows

set /p is a set command with a 'prompt' flag fed to it, meaning that it will prompt the user for a value to set the variable to. Example (untested):

set /p "myvar=Enter a value: "
echo You said %myvar%

To answer your second question, check out DosTips.

A good site for all things related to command line scripting is SS64.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.