1.

Solve : any input command can replace waiting keyboard?

Answer»

Dear friends,

Recently, I created a batch file with a command line below
copy con com1
this is trying to test the electronics drawer at our cash box CONNECTING to com1.
But this comman line will wait me to input any word and ctrl+Z to end of command "cpoy".

Is there any way to input any word and ctrl+Z through comman line at the batch file.

Thank you

AlanIf you only want to send a word to test the electronics drawer. you can do:

echo Hello > com1

If you need to input the word:

SET /P word=Say SOMETHING
echo %word% > com1

(this only works in W2000 an later)

and Also you can use the PARAMETERS %1, %2, ...

echo %1 > com1

Where %1 is the first argument when you execute your batch:

C:\>mybatch Hello
Dear friend,

Thank you.
It helps.

Alan



Discussion

No Comment Found