Solved

REM Line More defined

Posted on 2006-11-06
6
1,094 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Ok I have been working on this for some time having learned and gained certification in XenDesktop 4 along came version 5 which was released last month. Since then I have been working to deploy XenDesktop 5 in a small environment with only 2 virt…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

733 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