FAQ
254761 Nov 11 2005 ftp://garbo.uwasa.fi/pc/link/tsbat.zip
tsbat.zip Useful MS-DOS batch files and tricks, T.Salmi,
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FI-65101, Finland
Timo's FAQ materials at http://www.uwasa.fi/~ts/http/tsfaq.html
@echo off
:INPUT.BAT puts what is typed next in environment variable INPUT
set input=
echo INPUT.BAT
echo Type in something and press [Enter]
fc con nul /lb1 /n|date|find " 1: ">temptemp.bat
echo :Loop>>enter.bat
echo if not (%%input%%)==() set input=%%input%% %%5>>enter.bat
echo if (%%input%%)==() set input=%%5>>enter.bat
echo shift>>enter.bat
echo if not (%%5)==() goto Loop>>enter.bat
for %%x in (call del) do %%x temptemp.bat
del enter.bat
echo The string you just entered:
echo %input%
echo has been stored in an environment variable named INPUT
:End
For some reason the machine I have to work with does not have fc.exe.
Does anyone know where I can get one that will work on MS-DOS 6.22.
@echo off
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 Enter your name:
myinput.com
call myinput.bat
echo.
echo Hello %input%
echo.
I found another work that has worked for me. Thank you for your help
@This is the main batch file
@echo off
echo enter input followed by ctrl-z:
copy con usrinp.tmp
echo. >> usrinp.tmp
echo. >> usrinp.tmp
type usrinp.tmp | date | find "):" > usrinp.bat
call usrinp.bat
---------------------------------------------------
@support bat file named enter.bat
@echo off
if %2==date set usrinp=%4
-------------------------------------------------------
You can do some cleanup commands after calling usrinp.bat
The new environment variable will be usrinp