ask set /p variable on a different line

时间:2015-10-30 21:20:55

标签: batch-file cmd set

I've seen in batch code that you can ask for user input on a separate line or continue while asking or something. For example it would look something like this;

enter your name
name:_(input would be here)
enter name above

And the code might look like;

echo Enter your name
set /p /(continue) name=name:_
echo enter name above

Or maybe:

echo enter your name
(line 2)
echo enter your name above
set /p /line:2 name=name:_

1 个答案:

答案 0 :(得分:4)

MongoClient.connect(url, function(err, db) {
assert.equal(null, err);
var collection = db.collection('ac').find({},function(err,doc){
    if(err)
        throw err;
    else{
        console.log(doc);
    }
});
console.log("Connected correctly to server.");
db.close();
});

this post

的详细信息