batch file - How to make two running command-prompt windows send commands to each other on the same computer? -


i new using command-prompt programming related purposes if makes no sense or seems unclear please request elaborate , best.

what hoping able have 2 command-prompt windows open on windows machine (running windows 7) , have them communicate each other. instance want cmd window tell cmd window b print contents of file , vice versa.

is in anyway possible? also, know there may way polling file in 1 command-prompt window, asynchronous/non-blocking way of doing if possible.

thanks in advance!

i found quite simple make 2 command windows interact each other.

batch file 1:

:keepsending set /p message= echo set run=%message% >command.bat goto :keepsending 

batch file 2:

:running %run% set ran=%run% :check if not "%ran%"=="%run%" goto :running call command.bat timeout 1 >nul goto :check 

add in counter on , guess make work in longer code interacts each other.

if want work on network use poshd/popd


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -