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

keybd input 2 text file in batch

Reply to Message Icon

Original Message
Name: davisms
Date: December 8, 2003 at 10:02:26 Pacific
Subject: keybd input 2 text file in batch
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.


Report Offensive Message For Removal


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

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


Report Offensive Follow Up For Removal

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

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


Report Offensive Follow Up For Removal

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

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

Kev


Report Offensive Follow Up For Removal

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

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 ---


Report Offensive Follow Up For Removal

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

Uggh!

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

Kev


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: keybd input 2 text file in batch

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 6 Days.
Discuss in The Lounge