Re: Entering a username into a Batch file.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




"DaveO" <DaveO@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EC9DBA03-AE53-46BF-971E-CDAF4134A8D8@xxxxxxxxxxxxxxxx
What I'd like to do is move some files from a network location locally
over-night so that they're available to other programs.

The files I'm trying to move are simple .txt files, however on the network
location I need to enter a username and password.

How would I be able to send these 2 pieces of info (username / password)
in
a batch file so I can access the location?

TIA.

@echo off
set /p user=Please enter your logon name:
if "%user%"=="" goto Finish
set /p pw=. . . and your password:
if "%pw%"=="" goto Finish
(put your code here)
goto :eof

:Finish
echo.
echo Blank user name or password entered.
echo This program will now terminate.
echo Press the Space bar to close this window.
pause > nul


.



Relevant Pages

  • Re: to add username & password into my login.cmd - login script
    ... echo You are now logged into %computername% ... echo Now setting up your computer for network access. ... The above is a logon script that we r using in our network. ... When we run this script it keeps asking for username & password. ...
    (microsoft.public.windows.server.scripting)
  • Re: Using NET SEND for a pop-up box
    ... Why not use a batch file and some ECHO commands instead? ... I've done a bit of testing and found that NET SEND <username> ... Sc.exe config "messenger" start= auto ... The first part is using the SC command Microsoft released to make sure ...
    (microsoft.public.win2000.networking)
  • Re: Need help: PHP4 not parsing authentication
    ... Now fast forward to 2005 WITHOUT TOUCHING PHP for 3 years, ... echo "I bet you are glad you can see this secret page.";} else {// visitor's name and password combination are not correct ... username and password I entered. ...
    (alt.php)
  • RE: Help for Windows Vista.
    ... just add a username and password to your command. ... Echo Loggin into our company ... REM *** drev w ... Did you run the Script as Administrator? ...
    (microsoft.public.windows.vista.general)
  • Re: Make
    ... echo "UserId: $" ... echo "enter username (type end to exit)" ...
    (comp.unix.questions)