REM in batch file doesnt print text

L

Larry(LJL269)

I have a batch file which starts with:

echo off
echo rem ***
echo rem BEGIN Imaging F-> "U›\F-Data›\060619"
echo rem ***
"C:\Program Files\Image for Windows\imagew.exe"
/c00x03DDv U:\F-Data\060619test


which generates this output:

G:\>echo off
rem ***
The system cannot find the path specified.
rem
***
then imagew.exe executes in a new window.

How can I get 'BEGIN Imaging F-> "U›\F-Data›\060619"'
to appear in batch window? REM's r not supposed to be
executed! I've tried some quoting variations with no
luck.

Your help is MUCH appreciated.
Thanks- bye- Larry


Any advise is my attempt to contribute more than I have received but I can only assure you that it works on my PC. GOOD LUCK.
 
P

Pegasus \(MVP\)

Larry(LJL269) said:
I have a batch file which starts with:

echo off
echo rem ***
echo rem BEGIN Imaging F-> "U>\F-Data>\060619"
echo rem ***
"C:\Program Files\Image for Windows\imagew.exe"
/c00x03DDv U:\F-Data\060619test


which generates this output:

G:\>echo off
rem ***
The system cannot find the path specified.
rem
***
then imagew.exe executes in a new window.

How can I get 'BEGIN Imaging F-> "U>\F-Data>\060619"'
to appear in batch window? REM's r not supposed to be
executed! I've tried some quoting variations with no
luck.

Your help is MUCH appreciated.
Thanks- bye- Larry
Try this:

@echo off
echo. ***
echo BEGIN Imaging F-^> "U>\F-Data>\060619"
echo.
rem "C:\Program Files\Image for Windows\imagew.exe" /c00x03DDv
U:\F-Data\060619test
 
N

NoStop

Try this:

@echo off
echo. ***
echo BEGIN Imaging F-^> "U>\F-Data>\060619"
echo.
rem "C:\Program Files\Image for Windows\imagew.exe" /c00x03DDv
U:\F-Data\060619test

rem is a reserved word used to provide comments within a DOS batch file. It
is short for "remark". I'd think that starting a line with "rem" would
cause that line to NOT execute.


--
The ULTIMATE Windoze Fanboy:

http://video.google.com/videoplay?docid=-2370205018226686613

View Some Common Linux Desktops ...
http://linclips.crocusplains.com/index.php
 
P

Pegasus \(MVP\)

NoStop said:
rem is a reserved word used to provide comments within a DOS batch file. It
is short for "remark". I'd think that starting a line with "rem" would
cause that line to NOT execute.

Lines preceded by "rem" do not execute under WinXP. If you
look carefully then you will see that the OP had his lines
preceded by "echo", not by "rem".
 
N

NoStop

P

Pegasus \(MVP\)

NoStop said:
Yes, but if you look closely at YOUR reply and suggested way to rewrite that
batch file, YOU precede the executable line with rem. :)

Indeed, but so what? The OP had no problem with the executable
line. His problem related to the line above, the one containing the
redirection characters (">"). He started that line with
echo rem
instead of
rem
or perhaps
echo
and was unaware of how to "escape" the > character.
This is what I fixed for him. The removal of "Rem" in the
last line is self-evident (or at least I would have thought so).
 
L

Larry(LJL269)

On Wed, 21 Jun 2006 23:13:46 +1000, "Pegasus \(MVP\)"

|Try this:
|
|@echo off
|echo. ***
|echo BEGIN Imaging F-^> "U>\F-Data>\060619"
|echo.
|rem "C:\Program Files\Image for Windows\imagew.exe" /c00x03DDv
|U:\F-Data\060619test

Greetings & thank you for your response.

I generated bat files A to D which just got comments
correct. In E I added CHKDSK command which exxecuted
ok. Took F to H to add IMAGE command. This bat file is
generated by a macro so there was an added layer of
complexity to get it to generate the correct bat file.I
only spent this much time on this cause its applicable
to 3 other backups I do. Here's the final bat file and
its output follows the ====== line (note word wrap
makes it look funny):
@echo off
echo
***
echo Image "'F-> U:\F-Data\060622'"
echo
***
echo "C:\Program Files\Image for Windows\imagew.exe"
/c00x03DDv U:\F-Data\060622
"C:\Program Files\Image for Windows\imagew.exe"
/c00x03DDv U:\F-Data\060622
echo
***
echo chkdsk F:
echo
***
chkdsk F:
echo
***
echo *** VERIFY PARTITION IS OK BEFORE DEFRAGING
***
echo
***
PAUSE
del G:\Backup.bat
============================
***
Image "'F-> U:\F-Data\060622'"
***
"C:\Program Files\Image for Windows\imagew.exe"
/c00x03DDv U:\F-Data\060622
***
chkdsk F:
***
The type of the file system is NTFS.
Volume label is A4-F DATA.

WARNING! F parameter not specified.
Running CHKDSK in read-only mode.

CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
Index verification completed.
CHKDSK is verifying security descriptors (stage 3 of
3)...
Security descriptor verification completed.
Windows has checked the file system and found no
problems.

8193118 KB total disk space.
2007576 KB in 26114 files.
11928 KB in 3983 indexes.
0 KB in bad sectors.
59054 KB in use by the system.
27680 KB occupied by the log file.
6114560 KB available on disk.

4096 bytes in each allocation unit.
2048279 total allocation units on disk.
1528640 allocation units available on disk.
***
*** VERIFY PARTITION IS OK BEFORE DEFRAGING ***
***
Press any key to continue . . .
Any advise is my attempt to contribute more than I have received but I can only assure you that it works on my PC. GOOD LUCK.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top