Menu

#192 FOR %i IN (*.*) do @ECHO %i does not work

open
nobody
None
5
2018-07-24
2017-08-01
tom ehlert
No
for %i in (*.*) do echo %i

works as expected, also echoing the command itself.

E:\FREEDOS\SRC>echo SOFTIC~1.IMA
SOFTIC~1.IMA

however

    for %i in (*.*) do @echo %i

E:\FREEDOS\SRC>@echo SOFTIC~1.IMA
Bad command or filename - "@ECHO".

Discussion

  • Anonymous

    Anonymous - 2018-07-11

    --- C:\Users\liquidfox1776\Desktop\command diff\command.c 2018-07-10 22:47:08.337063000 -0400
    +++ C:\Users\liquidfox1776\Desktop\command diff\command2.c 2018-07-10 22:46:51.658429700 -0400
    @@ -414,6 +414,11 @@
    dprintf(("[alias expanded to (%s)]\n", s));
    #endif

    • if(*s == '@')
    • {
    • s++;
    • }
    • if (tracemode)
      { /* Question after the variables expansion
      and make sure all executed commands will
      @@ -797,7 +802,10 @@
      continue;
      }
      }
    • //Do not echo this line if command is proceeded by @
    • if(*parsedline == '@')
    • echothisline = 0;
    • if (echothisline) / Echo batch file line /
      {
      printprompt();

     
  • Bart Oldeman

    Bart Oldeman - 2018-07-24

    Thanks for the proposed fix. I fixed it slightly differently though:
    https://sourceforge.net/p/freedos/svn/1825

     

Log in to post a comment.