• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 770
  • Last Modified:

What does :launchapp mean in this bat file

I have the below which does work.  However, I simply copied from another bat file and while I understand most, what does the line at the bottom :launchapp mean?

@ECHO Starting LMR_FE...
@ECHO OFF


REM --- SET LOCAL_PATH="C:\Documents and Settings\All Users\Application Data\SOS\LMR"
SET LOCAL_PATH="C:\Temp"
SET SERVER_PATH="\\sf1\user1\shared\DepositServices\CIA\SOS_APPLICATIONS\Database_FrontEnds"
SET APP_FILE_NAME="LMR_FE.mdb"

:buil_dpath
REM --- Create Directory ---
if not exist %LOCAL_PATH%\ (mkdir %LOCAL_PATH%)
goto copy_app_file

:copy_app_file
REM --- Copy File whether it exists or not, ensures most recent version  ---
REM --- DO NOT USE THe d/ switch, it only works if a date is supplied
REM --- otherwise it does not copy a new version, simply leave it off
xcopy /y/c/q %SERVER_PATH%\%APP_FILE_NAME% %LOCAL_PATH%
goto copy_images

:copy_images
REM if not exist "%LOCAL_PATH%\Images" (mkdir %LOCAL_PATH%\Images)
REM xcopy /y/c/q %SERVER_PATH%\Images\*.* %LOCAL_PATH%\Images
REM xcopy /y/c/q %SERVER_PATH%\systray.ico %LOCAL_PATH%\
goto launchapp

:launchapp   ?WHAT DOES THIS MEAN?
START "LMR" /B /REALTIME %LOCAL_PATH%\%APP_FILE_NAME%


:exit
EXIT
0
ssmith94015
Asked:
ssmith94015
3 Solutions
 
Seaton007Commented:
It is a comment.  Whoever wrote the batch file put it there to let you know what the next section of code will be doing.  In this case it will be launching an app.

Here are some more details: http://www.robvanderwoude.com/comments.php
0
 
Paul MacDonaldDirector, Information SystemsCommented:
It's not a comment, it's the equivalent of a subroutine name.  You can see the "goto launchapp" command just above it.
0
 
Seaton007Commented:
Well, technically it is a label, which is basically the same as a comment, except you can use the GOTO command to skip to a label in a batch file.  His question was, "What does :launchapp mean?"  In this batch file, :launchapp servers as a label/comment.  The batch file would already go to the ":launchapp" section from the previous section even without the GOTO command.  The GOTO commands in this particular batch file aren't even necessary.
0
 
käµfm³d 👽Commented:
I agree with the distinction between comment and label. A label implies a programmatic jump in the logic; a comment implies metadata. While I agree that in this case the labels (and gotos) really aren't functioning in that design, I think it would be better to treat them as they are.
0
 
ssmith94015Author Commented:
Got it and its functionality.  I was thinking it was a command or action of some sort, but a label/comment I understand in conjunction with the GoTo command.  In this case, it is a label and not a comment.  Which actually leads to another question, which I will post.  The START command

START "LMR" /B /REALTIME %LOCAL_PATH%\%APP_FILE_NAME%

What function does putting the "LMR" in the line do?

Again, this will be another question for points.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now