Echo to file with batch programing -
i want learn echo file, batch programing.
my batch :
@echo off echo hello world > c:\text.txt
text.txt result :
hello world
it seccessfully
but if batch file (added '"'):
@echo off echo hello '"' world > c:\text.txt
result :
microsoft windows [version 6.1.7601] copyright (c) 2009 microsoft corporation. rights reserved. c:\users>echo hello '"' world > c:\text.txt hello '"' world > c:\text.txt
why text.txt not created?
you should escape single double quote:
echo hello '^"' world>test.txt
otherwise echo
parser waiting closing double quote , >
redirection remains escaped quote.
Comments
Post a Comment