echo - Text in Batch file -
i need batch file make batch file , doing using @echo[ text >> e\1.bat
instead output text
, batch file empty
here code:
@echo off (@echo[ if "%!c!%" == "" (set c=) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == " " (set c= ) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0011." (set c=z) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0100." (set c=y) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0110." (set c=x) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "100." (set c=w) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "1110." (set c=v) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "110." (set c=u) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0." (set c=t) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "111." (set c=s) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "101." (set c=r) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0010." (set c=q) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "1001." (set c=p) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "000." (set c=o) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "01." (set c=n) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "1011." (set c=l) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "010." (set c=k) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "1000." (set c=j) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "11." (set c=i) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "1111." (set c=h) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "001." (set c=g) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "1101." (set c=f) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "1." (set c=e) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "011." (set c=d) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0101." (set c=c) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "0111." (set c=b) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt (@echo[ if "%!c!%" == "10." (set c=a) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt pause
the output need is:
if "%!c!%" == "" (set c=) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == " " (set c= ) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "0011." (set c=z) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "0100." (set c=y) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "0110." (set c=x) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "100." (set c=w) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "1110." (set c=v) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "110." (set c=u) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "0." (set c=t) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "111." (set c=s) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "101." (set c=r) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "0010." (set c=q) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "1001." (set c=p) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "000." (set c=o) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "01." (set c=n) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "00." (set c=m) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "1011." (set c=l) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "010." (set c=k) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "1000." (set c=j) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "11." (set c=i) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "1111." (set c=h) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "001." (set c=g) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "1101." (set c=f) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "1." (set c=e) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "011." (set c=d) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "0101." (set c=c) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "0111." (set c=b) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
if "%!c!%" == "10." (set c=a) && @echo[ %c% >> c:\encoder-decoder\decodetext.dct
you should escape special symbols %
or >
in echo
:
(echo if "%%!c!%%" == "" ^(set c=^) ^&^& echo %%c%% ^>^> c:\encoder-decoder\decodetext.dct) >> e:\storge\1.txt
will output in e:\storge\1.txt:
if "%!c!%" == "" (set c=) && echo %c% >> c:\encoder-decoder\decodetext.dct
Comments
Post a Comment