Re: i want to add a promt to a batch command.
- From: "JerryMac12" <gerald.w.mcintyre@xxxxxxxxxxxxxxxxx>
- Date: 12 Dec 2006 04:22:02 -0800
When you want to add a prompt to a BATCH file you would use the set
command
so if you wanted to name your variable "Username" you would have
something like this
set /p Username=please enter user's name:
set is the command
/p is the switch that instructs for a prompt
Username is the varable
and "please enter user's name:" is what is displayed on the screen as
the prompt.
when you want to call the value stored in "Username" you would call it
as %Username%
so a simple bat would be like this
set /p username=please enter user's name:
type Hi %Username%
will output a prompt that says "please enter user's name:"
lets say the user enters "Bob"
it will then output Hi Bob
Seth wrote:
this is the command:
subinacl /noverbose /subdirectories C:\*.*
/accountmigration=OldDomain\OldUser=NewDomain\NewUser
I need to run this on a lot of machine. But i don't want to edit the
OldDomain\OldUser and NewDomain\NewUser part eveytime..
When i run the batch script on command prompt c:>Migrate.cmd I want the
script to ask me type old user and then type new user. and after that run
the command.
.
- References:
- i want to add a promt to a batch command.
- From: Seth
- i want to add a promt to a batch command.
- Prev by Date: Re: script for mapped drives
- Next by Date: Re: i want to add a promt to a batch command.
- Previous by thread: i want to add a promt to a batch command.
- Next by thread: Re: i want to add a promt to a batch command.
- Index(es):
Relevant Pages
|