Loading ...
Sorry, an error occurred while loading the content.

Re: FW: [BATCH WORLD] Help

Expand Messages
  • Michael Marquart
    On Thu, 12 Sep 2002 15:28:05 -0400, Martin, Sam ... The caret is an escape character in NT and used when echoing certain characters.
    Message 1 of 2 , Sep 12, 2002
    • 0 Attachment
      On Thu, 12 Sep 2002 15:28:05 -0400, "Martin, Sam" <sam.martin@...>
      wrote:

      >Interesting.
      >I don't understand the carats in:
      >for /f "tokens=5-8 delims=:. " %%a in ('ver^|time^

      The caret is an escape character in NT and used when echoing certain
      characters.

      echo ^>

      will echo > to the screen which couldn't be done as simply in Win9x.

      >Likewise, the use of the colons in
      >
      >if "%time:~1,1%"==":" set time=0%time%

      This checks if the second character is a colon, which can occur in a am/pm
      time of say 4:45 pm, and adds a leading zero.

      >set time=%time::=%

      This removes all colons from %time%.

      Syntax is %var:x=y% which replaces x with y in %var%.

      --
      Regards,
      Michael
    Your message has been successfully submitted and would be delivered to recipients shortly.