Re: i want to add a promt to a batch command.



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.

.



Relevant Pages

  • Re: faq 2.24 username mit environ auslesen
    ... Die Win 9x haben keinen eigenen Kontext im Command ... Dort ist im Command Prompt auch oftmals die Variable UserName nicht ... Variable UserName immer gesetzt, wenn man am Netzwerk dran ist (soweit ...
    (microsoft.public.de.access)
  • Running FTP Batch file on server
    ... I want to download hourly definitions from the Symantec ftp site using a ... The batch file fails and if at the command ... prompt I type open ftp.symantec.com I just get an error: ...
    (microsoft.public.windows.server.sbs)
  • RE: Setting env and path variables
    ... If you set up a batch file, with the commands below and run it in a command ... prompt under winXP it should work. ... Subject: Re: Setting env and path variables ...
    (comp.os.msdos.djgpp)
  • Re: Simple AD shell script - discover usernames
    ... If you're intending in placing the command above in a batch file don't ... > username for each entry. ... > All I want is the SMITHJ appending to the "smith, ...
    (microsoft.public.windows.server.scripting)
  • Re: Windows Share - Prompt for Different Username and Password
    ... I understand how to connect to a Windows share using the net use command to specify the username and password. ... Is there some application or utility that could make a dialogue box to prompt for that information? ... I have users that login with one set of credentials, and then need to map a share with a different username and password. ...
    (microsoft.public.windowsxp.network_web)