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

SETLOCAL can be used on the command line

Discussion in 'T&T - Miscellaneous' started by Joe Caverly, Jul 18, 2013.

  1. Joe Caverly

    Joined:
    Aug 28, 2009
    Messages:
    698
    Likes Received:
    8
    Way back in the days of 4DOS, the help file said "You cannot use SETLOCAL in an alias or at the command line."

    Well, I do not know when this changed, and it does not really matter, but I noticed in the TCMD v15 help file that "SETLOCAL can be used on the command line, in aliases, and in batch files."

    I make extensive use of SETLOCAL in my batch files, and am quite pleased that I can also use it on the command line.

    I share this information in the event there are others, like myself, who missed the update to SETLOCAL.

    Yes, all this applies to ENDLOCAL as well. Note well that the help file says;

    "you are responsible for matching the SETLOCAL / ENDLOCAL calls from an alias or command line; TCC will not perform an automatic ENDLOCAL."

    Joe
     
    mikea likes this.

Share This Page