my batch currently asking for an input for one line of net use command, and then it pauses and asks for another line of input.
My goal would be, that if i copy paste 10 or 20 lines of directory names separated with an Enter, then it does each line and then i would have 10 or 20 attached network drive.
I couldn't find anything which can help me or i am not sure what to look for exactly.
Is it even possible?
@echo off
cls
:start
set /p Input=Enter shared directory name:
net use * \\%Input%\directory /USER:someuser Somepassword
pause
goto start
CodePudding user response:
Try removing the pause:
@echo off
cls
:start
set /p Input=Enter shared directory name:
net use * \\%Input%\directory /USER:someuser Somepassword
goto start