Computing.Net > Forums > Disk Operating System > keybd input 2 text file in batch

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.

keybd input 2 text file in batch

Reply to Message Icon

Name: davisms
Date: December 8, 2003 at 10:02:26 Pacific
OS: DOS
CPU/Ram: NA
Comment:

I would like to capture keyboard input from a user and save it to particular line in an existing text file.

ie.
Batch may ask:
What is your name?

User via keyboard inputs:
JohnDoe (return/enter)

that input would then be saved to an existing file (mylog.txt) at particular line:

IP=123.567.234.321
DOMAIN=MYDOMAIN
COMPUTER=MYCOMPUTER
USERNAME=JohnDoe


Thanks in advance.



Sponsored Link
Ads by Google

Response Number 1
Name: nathan
Date: December 8, 2003 at 15:51:28 Pacific
Reply:

kina depends on whether u have xp or 98. you say you have dos so i'm guessinng you mean the real dos. so anyway you can find what u need at leonardo's site. as for once you get the unput...
echo %input% >> myfile.txt


0

Response Number 2
Name: nathan
Date: December 8, 2003 at 15:53:41 Pacific
Reply:

p.s. its very important that its ">>" and not just ">" because you will overwrite myfile.txt rather then add to it.


0

Response Number 3
Name: sh0k0nes
Date: December 9, 2003 at 05:01:19 Pacific
Reply:

Have the perfect tools for this.
Been using them in my bootdisks and unattended for years.

Kev


0

Response Number 4
Name: uli_glueck
Date: December 9, 2003 at 23:48:07 Pacific
Reply:

maybe this helps:


REM --- realizes the INPUT command for DOS-

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 Eingabe der Nachricht:

myinput.com
call myinput.bat
echo.

echo.
del myinput.com
del myinput.bat

REM --end of the input command ---


0

Response Number 5
Name: sh0k0nes
Date: December 10, 2003 at 03:44:24 Pacific
Reply:

Uggh!

Look for setparam.exe and strings.com.
They r perfect for this job.

Kev


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

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


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: keybd input 2 text file in batch

Batch file to create/edit text file www.computing.net/answers/dos/batch-file-to-createedit-text-file/9206.html

move text in text file with batch www.computing.net/answers/dos/move-text-in-text-file-with-batch/12670.html

read first line from text file www.computing.net/answers/dos/read-first-line-from-text-file/15066.html