What does :: (double colon) mean in DOS batch files?

后端 未结 5 769
半阙折子戏
半阙折子戏 2020-11-27 04:58

I found this program http://baiyunmanor.com/blog/work/get-current-date-time-in-dos-batch-file/

But I don\'t know what does the line

:: datetime.bat
<         


        
5条回答
  •  臣服心动
    2020-11-27 05:24

    As mentioned by acdcjunior Labels and :: have a special logic and can cause problems in parenthesis blocks

    Here are couple of samples

    Sample 1

    IF 1==1 (
      ::
    )
    

    Output of sample 1

    ) was unexpected at this time.
    

    Sample 2

    IF 1==1 (
      ::
      ::
    )
    

    Output of sample 2

    The system cannot find the drive specified.
    

提交回复
热议问题