Computing.Net > Forums > Programming > using a text input in a batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

using a text input in a batch file

Reply to Message Icon

Name: Steve.alexander
Date: July 6, 2005 at 00:39:16 Pacific
OS: Win XP
CPU/Ram: 1.66/512
Comment:

I would like to create a batch file for NET SEND so that it can prompt the user for the computer's address and the message. How do i do the text inputs??? I know how to do it in VB/C# but not sure about dos....



Sponsored Link
Ads by Google

Response Number 1
Name: uli_glueck
Date: July 6, 2005 at 05:02:10 Pacific
Reply:

Hi,
the listing realizes the Input Command in NT-Batch. Not Sure if it works correct with XP.
You get the text input in %input%.
The line below the echo command belongs to the echo command. In the text window is not enough space. sorry.

REM --- INPUT ---

echo BATCH_INPUT___hgQX-PPP_XPPP E#HH0E50EG0Ef0Ehs>myinput.com
echo myinput.bat hoAX5@@PZYh@xX5@D3!r/P[WX,b,-PZh>>myinput.com
echo X3!X2ErP,{,{PYX4=0ErWX,j,-PZh@@X3!=set input>>myinput.com
ECHO.
ECHO.
ECHO.
echo Write the message:

myinput.com
call myinput.bat
echo.

echo.
del myinput.com
del myinput.bat


%input%


hope it helps

uli


0

Response Number 2
Name: dtech10
Date: July 6, 2005 at 13:53:33 Pacific
Reply:

Hi
In WinXP

echo Address
set /p Address=
echo Message
set /p Message=
echo %Address%
echo %Message%



0

Response Number 3
Name: Phar B3hind
Date: August 26, 2005 at 14:03:48 Pacific
Reply:

~~~~~~~~~~~~copy~~~~~~~~~~
@ECHO OFF
CLS
:BEGIN
echo Address
set /p Address=

echo Message
set /p Message=

NET SEND %Address% %Message%
PAUSE
GOTO BEGIN
:END
~~~~~~~~~~~~~~paste~~~~~~~~~~~~~~~~
[dtech10] has the idea.You need to adjust the syntax of the NET SND LINE! I dont know it off by heart.

BTW, Good idea for BATCH.

May the forces of evil become confused on the way to your house.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: using a text input in a batch file

need help making a batch file work www.computing.net/answers/programming/need-help-making-a-batch-file-work-/14441.html

Text Input Box in a Batch File www.computing.net/answers/programming/text-input-box-in-a-batch-file/15016.html

Robocopy function in a batch file www.computing.net/answers/programming/robocopy-function-in-a-batch-file/13172.html