Creating a batch file with user input
Posted on 2010-09-15
I am fairly new to batch scripting and I am learning it bit by bit.
I would like to create a batch file that maps drives for users when they are in the office.
The batch file will ask the user "Are you in the office?" and if they answer Yes, the script will map the drives and if they answer No, the script will exit.
This is my first try and I know it's wrong because it doesn't execute.
Please correct my mistakes.....
echo Are you working in the Head office?
If Y goto :Y
net use j: \\joburg\admin
net use k: \\kathmandu\data
net use r: \\rome\project
net use v: \\valencia\group