|
Answer» Dear All,
Could someone help me to make my cmd.exe recognized echo. again?
Before it worked fine in my XP, but after i try redirection command, like this 2>&echo.>>error.txt it become error... i can't USED echo. anymore...it said 'echo.' is not recognized as an external or internal command.
So help pls, anyone give solution to make it works again...
many thanks
rasWhere did you get this weird code from?
Code: [Select]2>&echo.>>error.txt What is the 2>& supposed to do?
Code: [Select]C:\>2>&echo.>>error.txt 2>& was unexpected at this time. try this
Code: [Select]echo.>>error.txt
thanks for reply...
yup i khow that's a weird code..because i just create it for my experiments... here is the detail... actually before, i used xcopy %src% %dest% /d /y /i>>report.txt 2>error.txt
it worked ok, and than i tried (echo. +++date create+++ date /t & time /t)>error.txt xcopy %src% %dest% /d /y /i>>report.txt 2>error.txt
it became error: file can't create because already hold by other process...
And then i tried weird STUFF for error redirection....not only that may be i did something...
but after that i could not used echo. anymore but it work ok with echo only....event a simple code like: echo. HELLO word , but worked ok for: echo hello word i think, i did something that change the cmd.exe...
i already tried to reboot my xp sp2... still the same if i used echo. ...the same error arised...
thx again...did you know there is a difference between echo. and echo ? yup.. with echo. we can send BLANK on our output device...ex:
echo.test echo. echo.oc
will give output like this:
test
oc
Not only that of course: it help us easy on typing code..like echo.On no NEED to worry echoon mistake,etc Anyway..i found my mistake.. i think, the command that made it wrong was: xcopy %src% % dest% /d /y 2>echo.>>error.txt And yup that code is my creation...and of course weird....
I tried to give more detail...after that.. echo. is not recognized.......yeah my mistake was i check command from the same directory...
for that code i used batch file name" test.bat" and from this directory c:\lab>
and i tried this command c:\lab>test.bat and the result was error that i mentioned.
and i tried from root directory c:\>c:\lab\test.bat and the same error....hmmm
and after i tried c:\>echo. Hello word
it's working...
Yeah my mistake was that my weird code before....which was creating file "echo" without any extention... so from my work directory c:\lab> echo. always error..
after i delete...."echo"file... it worked well again..as before normal
as u can see my weird code, made that echo file in my working directory...
thx a lot
|