Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: name input  (Read 4036 times)

0 Members and 1 Guest are viewing this topic.

Draco

  • Guest
name input
« on: August 05, 2004, 09:49:41 AM »
How do i do this?
(its not realy like this, but its the way i do it)

ECHO Hi *name* > test.txt
ECHO Bye *name* >> test.txt

but the *name* part must be defined by the user

thx

johnwill

  • Guest
Re: name input
« Reply #1 on: August 05, 2004, 02:25:56 PM »
ECHO Hi %1 > test.txt
ECHO Bye %1 >> test.txt

The %1 substitutes the text following the batch file name into the batch file, if the name of the batch file is TEST.BAT, you'd type:

TEST MYNAME

and MYNAME would be substituted for the %1 in the above statements.

Draco

  • Guest
Re: name input
« Reply #2 on: August 05, 2004, 07:13:15 PM »
But I need the user to enter the *name* into the screen, is this possible and if it possible; how?

johnwill

  • Guest
Re: name input
« Reply #3 on: August 06, 2004, 07:45:56 AM »
Try INPUT.ZIP from http://garbo.uwasa.fi/pc/batchutil.html, and note that there are tons of other batch utilities there too.