1

I am working on one large project. In this i have to create one batch file for doing some operation like copy, move,convert the files. I have used one reference file which is similar to our project. From this , some contents are follows

 1   @echo off
 2   :: Param 1 > Firmware version,Param 2 > 1/2 for primary & Secondary 
 3   if "%1"=="" (
 4   goto ERROR
 5   ) else if "%2"=="" (
 6   echo NOT ENOUGH PARAMETERS
 7   goto ERROR
 8   )
 9   ::If primary :>  Clenaup, if secondary:> Check primary file
10   if %2==1 (

What is meaning for line numbers 2,3,9 and 10.(For mentioning purpose only i am entered sequence numbers.) Can any one tell me please...?

Anbu.Sankar
  • 1,326
  • 8
  • 15
  • `::` is sometimes used as a comment indicator instead of `REM`. It's not documented and can make trouble in some special cases. Lines 3 and 10 are checking the presence (line 3) or value (line 10) of a parameter (`%1` is the first given parameter, `%2` the second and so on) – Stephan Dec 18 '14 at 12:09

1 Answers1

0

:: (also known as comment label) is just a comment

cjhines
  • 1,148
  • 3
  • 16
  • 32
  • Excuse me. As far as I know, there is not a single _official site_ that documents that `::` "is also called _comment label_", but if you know of anyone I really would like to know of it... See: [this post](http://stackoverflow.com/questions/16632524/what-does-double-colon-mean-in-dos-batch-files/16639875#16639875) – Aacini Dec 18 '14 at 17:04
  • You're excused. Didn't mean to imply that's it's official name. Edited comment to prevent people getting confused. – cjhines Dec 19 '14 at 10:09
  • "To critique or request clarification from an author" Except that's not what I did. – cjhines Dec 19 '14 at 10:57