1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

IF difficulty

Discussion in 'TCC/LE Support' started by trawson, Aug 16, 2011.

  1. trawson

    Joined:
    May 21, 2008
    Messages:
    4
    Likes Received:
    0
    Hi Rex or whomever ...

    A minor annoyance here, I frequently use the following alias to update a flash drive:
    set drv=k %+ if "%1" != "" set drv=%1 %+ copy /su e:\dirname\* %drv:\dirname\ %+ unset drv
    In my old 4NT this works fine, it copies changed or new files to drive k: (or whatever drive I designate). In TCC/LE (12.11.74) if I leave the parameter off it does nothing, just returns to the prompt -- no errors or messages -- even when there are multiple new or changed files on drive e:. However, if I add the parameter it works fine. This is a long-standing problem, I just never took the time to investigate it before.

    TCC/LE seems to be behaving as if the IF command applies to everything after it and not just to the SET.

    What am I missing here??

    Thanks,

    Tom
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,863
    Likes Received:
    83
    COPY /U difficulty

    Go to OPTION / Startup and see what your "Duplicate CMD.EXE bugs" setting
    is. (CMD will discard all remaining commands on the line if an IF fails;
    see IF in the help for details.)

    Rex Conn
    JP Software
     
  3. trawson

    Joined:
    May 21, 2008
    Messages:
    4
    Likes Received:
    0
    Thanks, that was it. So is duplication of bugs considered a feature? :-) I guess so if you have to make batch files run in both environments ...

    --
    Tom
     

Share This Page