Solved

REM Line More defined

Posted on 2006-11-06
6
1,038 Views
Last Modified: 2009-07-29
I am writing a batch file and don't like the REM line set out from the path name.  I would like the REM line to be more like a Title or Explaination of a Process so that it is real clear to the user what it is doing.  How can I accomplish this?
0
Comment
Question by:tedpenner
6 Comments
 
LVL 3

Expert Comment

by:Stekman99
ID: 17881904
Here is a good rescource:
http://labmice.techtarget.com/articles/batchcmds.htm

Show me what you have and what you really want to do I will try help you.

Cheers,
Stefan
0
 
LVL 22

Expert Comment

by:cj_1969
ID: 17881921
Can you provide an example of what you are referring to?

I use REM lines to comment my code all the time.

I usually start them with ...
REM ***

for ease of reading I also usually enter them all in caps ... makes them stand out more amounst the code

For a title, you can make a box ...
REM ***********************************************
REM ***                                                                                  ***
REM ***                   TITLE GOES HERE                                     ***
REM ***                                                                                  ***
REM ***********************************************

Get ceative  :)

Let me know if you want something more specific.
0
 
LVL 17

Accepted Solution

by:
Eagle6990 earned 500 total points
ID: 17882943
REM is just a Remark line to keep the code looking good and well documented. If you are wanting to update the window about the process you can use the ECHO statement.  So in your batch file you can do

Echo Starting install of Winzip

And that line will appear in the black command prompt box while it is running.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:tedpenner
ID: 17883380
Now that's what I was after!

Ok now using echo, suppose I want to hide other parts of the script.  Can I selectively hide other items that would appear in the DOS window when the user runs the script?

On another note:
Scanstate and Loadstate have a cool feature whereby you get a cute litle turning icon (much like an hourglass) as the script progresses.  You also get a message that says 3 minutes remaining or whatever that appears to be accurate.  I would like to show those items.
0
 
LVL 17

Expert Comment

by:Eagle6990
ID: 17885085
Yep, just turn echo off and on as needed.
http://www.ss64.com/nt/echo.html
0
 
LVL 22

Expert Comment

by:cj_1969
ID: 17889135
Start your batch file with
@Echo Off

This will stop the displaying of the commands as the execute.
Then when you put in a specific echo statement it will be displayed in the command window.

So ...

@echo off
set var1=value1
set var2=value2
Echo.
Echo This is a test display line.
Echo.
Echo The word echo with a period after it forces a blank line
Echo.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup". After a while, you have entered a loop for Auto repair which does not fix anything and you will be in a  panic as all your work w…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now