Announcement

Collapse
No announcement yet.

:: in batch file

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • :: in batch file

    Hi Guys,

    Anyone know what :: does in a batch file as per the following code snippet:

    If exist %systemroot%\IT\wallpaper.flg del %systemroot%\IT\wallpaper.flg
    If exist %systemroot%\IT\wallpaper1.flg del %systemroot%\IT\wallpaper1.flg
    :: If exist %systemroot%\IT\wallpaper2.flg goto go5
    Thanks

    Michael
    Michael Armstrong
    www.m80arm.co.uk
    MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

    ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

  • #2
    Re: :: in batch file

    "::" is basically the same as REM in that the script will ignore the line.
    If the information you receive helps please let us know and leave reputation points where appropriate.

    The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. - Ted Nelson

    Comment


    • #3
      Re: :: in batch file

      Thanks very much g00ner - Have a bunch of rep points
      Michael Armstrong
      www.m80arm.co.uk
      MCITP: EA, MCTS, MCSE 2003, MCSA 2003: Messaging, CCA, VCP 3.5, 4, 5, VCAP5-DCD, VCAP5-DCA, ITIL, MCP, PGP Certified Technician

      ** Remember to give credit where credit is due and leave reputation points sigpic where appropriate **

      Comment


      • #4
        Re: :: in batch file

        the meanning of the double colon is comment

        edit:

        sorry me and g00ner wrote in the same time
        Any advice is given in good faith and without warranty.
        Please give reputation points where appropriate.

        Comment


        • #5
          Re: :: in batch file

          My absolute pleasure Michael

          It's better to use :: in a script because the line is not processed at all, unlike REM which is, so consequently your script will run quicker using :: for comments.
          If the information you receive helps please let us know and leave reputation points where appropriate.

          The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do. - Ted Nelson

          Comment


          • #6
            Re: :: in batch file

            Here is some more info on that. - http://www.robvanderwoude.com/comments.html

            Ta
            Caesar's cipher - 3

            ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

            SFX JNRS FC U6 MNGR

            Comment

            Working...
            X