[comp.sys.ibm.pc] Joy of MSDOS

nelson_p@apollo.uucp (03/19/88)

 I just bought a PC and I'm becoming familiar with MSDOS.
 I must admit that I haven't decided whether MSDOS is a 
 real operating system or a toy operating system.  Two
 questions:

  Is there any way to create batch files that don't echo 
  their contents to the screen?  If I precede the other 
  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
  'ECHO OFF' gets echoed!   
 
  Why does the PATH command only apply to some kinds of files
  and not others?   If you're going to have a 'where to look'
  feature for the computer why limit the types of files it 
  applies to? 
 
 I understand that these 'features' are *somewhat* corrected in
 MSDOS 3.3 (I have 3.2).   I actually own a copy of 3.3.  Unfortun-
 ately 3.3 has a bug  (driveparm is not recognized) which results
 in 3.5" drives not working correctly.  Microsoft claims that they
 will offer a fix for this in a month or two.  Since my machine has 
 both a 5.25" and 3.5" drive (plus a hard disk) I'm stuck for now
 with MSDOS3.2 .      
                                         --Peter Nelson

dick@slvblc.UUCP (Dick Flanagan) (03/19/88)

In article <9429@sunybcs.UUCP> ugfailau@sunybcs.uucp (Fai Lau) writes:
> In article <3aee6925.44e6@apollo.uucp> nelson_p@apollo.uucp writes:
> >
> >  Is there any way to create batch files that don't echo 
> >  their contents to the screen?  If I precede the other 
> >  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
> >  'ECHO OFF' gets echoed!   
> > 
> 	Hey, anyone who knows the answer to this gives me a response too,
> will ya? Thanx
> 
> >  Why does the PATH command only apply to some kinds of files
> >  and not others?   If you're going to have a 'where to look'
> >  feature for the computer why limit the types of files it 
> >  applies to? 
> 
> 	Hummmm, Dos 3.20 has been good to me in that it does look
> through the whold path for a file to be executed. One thing though,
> when an executable looks for a "slave" file (like an overlay),
> it doesn't even know that the path exists!!!

I have seen patches to IBM's PC-DOS 3.2 that solves the first problem by
making ECHO OFF the default for batch files (No, I don't have a copy of
it, sorry!  Check with your neighborhood BBS.).

There are also several "dpath" (data path) utilities available from
various BBS's that solve the second problem.

DOS 3.3 solves *both* problems.

Dick

--
Dick Flanagan, W6OLD                         GEnie: FLANAGAN
UUCP: ...!ucbvax!ucscc!slvblc!dick           Voice: +1 408 336 3481
Internet: slvblc!dick@ucscc.UCSC.EDU         LORAN: N037 04.7 W122 04.6
USPO: PO Box 155, Ben Lomond, CA 95005

ugfailau@sunybcs.uucp (Fai Lau) (03/19/88)

In article <3aee6925.44e6@apollo.uucp> nelson_p@apollo.uucp writes:
>
>  Is there any way to create batch files that don't echo 
>  their contents to the screen?  If I precede the other 
>  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
>  'ECHO OFF' gets echoed!   
> 
	Hey, anyone who knows the answer to this gives me a response too,
will ya? Thanx

>  Why does the PATH command only apply to some kinds of files
>  and not others?   If you're going to have a 'where to look'
>  feature for the computer why limit the types of files it 
>  applies to? 

	Hummmm, Dos 3.20 has been good to me in that it does look
through the whold path for a file to be executed. One thing though,
when an executable looks for a "slave" file (like an overlay),
it doesn't even know that the path exists!!!

Fai Lau
SUNY at Buffalo (The Arctic Wonderland)
UUCP: ..{mit-ems|watmath|rocksanne}!sunybcs!ugfailau
BI: ugfailau@sunybcs

vu0112@bingvaxu.cc.binghamton.edu (Cliff Joslyn) (03/19/88)

In article <9429@sunybcs.UUCP> ugfailau@sunybcs.UUCP (Fai Lau) writes:
>In article <3aee6925.44e6@apollo.uucp> nelson_p@apollo.uucp writes:
>>  Is there any way to create batch files that don't echo 
>>  their contents to the screen?  If I precede the other 
>>  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
>>  'ECHO OFF' gets echoed!   
>> 
>	Hey, anyone who knows the answer to this gives me a response too,
>will ya? Thanx

C:> x.bat > nul

O---------------------------------------------------------------------->
| Cliff Joslyn, Professional Cybernetician 
| Systems Science Department, SUNY Binghamton, New York, but my opinions
| vu0112@bingvaxu.cc.binghamton.edu
V All the world is biscuit shaped. . .

amlovell@phoenix.Princeton.EDU (Anthony M Lovell) (03/20/88)

In article <9429@sunybcs.UUCP>, ugfailau@sunybcs.uucp (Fai Lau) writes:
> In article <3aee6925.44e6@apollo.uucp> nelson_p@apollo.uucp writes:
> >
> >  Is there any way to create batch files that don't echo 
> >  their contents to the screen?  If I precede the other 
> >  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
> >  'ECHO OFF' gets echoed!   
> > 
> 	Hey, anyone who knows the answer to this gives me a response too,
> will ya? Thanx
> 
> Fai Lau

Also, is there some way to have DOS buffer more than a single line of
the batch file at a time?  It goes to the disk for each line of batch 
commands!
One more thing!  The status of echo (OFF/ON) changes on me sometimes.
Why?  I DON'T tell it to.

-- 
amlovell@phoenix.princeton.edu     ...since 1963.

disclaimer:
These are MY opinions.  You only WISH they were yours.

madd@bu-cs.BU.EDU (Jim Frost) (03/21/88)

In article <9429@sunybcs.UUCP> ugfailau@sunybcs.UUCP (Fai Lau) writes:
>In article <3aee6925.44e6@apollo.uucp> nelson_p@apollo.uucp writes:
>>
>>  Is there any way to create batch files that don't echo 
>>  their contents to the screen?

There are patches for every version of MS-DOS that do this; sorry I
don't have them online.  Check local BBS's  -- they're pretty well
publicized.  All that's required is the changing of an internal flag
in COMMAND.COM.  Why Microsoft didn't allow the user to set the
default state is beyond me, but then again uSoft seems to have a track
record of not recognizing the needs of their users for unreasonably
long periods of time.

>>  Why does the PATH command only apply to some kinds of files
>>  and not others?   If you're going to have a 'where to look'
>>  feature for the computer why limit the types of files it 
>>  applies to? 
>
>	Hummmm, Dos 3.20 has been good to me in that it does look
>through the whold path for a file to be executed. One thing though,
>when an executable looks for a "slave" file (like an overlay),
>it doesn't even know that the path exists!!!

The PATH command is used to specify a search path of subdirectories
for commands, not data.  There are a lot of reasons for doing it this
way, not the least of them being the segregation of different data
file types by directory.  It would be messy to have one
wordprocessor pull up the .DOC file for another, for example.  It's
easier to allow the user to specify the path for data files.  If you
need to access a file without a path when you're in a different
directory (some applications don't recognize paths), use the SUBST
command, which allows you to substitute a drive name for a path.  Read
the manual for a more detailed description.

As for overlay location, there are a variety of methods used by
applications to find files that they require.  Under MS-DOS 3.10 or
greater, programs can get the path of the executable from the PSP
(Program Segment Prefix).  This is more or less documented in the Disk
Operating System Technical Manual.  With earlier versions, searching
the path for the needed files can be used.  PC-WRITE is one
application that appears to use this method.  Most commonly programs
either require a specific path for their files (root seems to be
common, which is annoying) or have an installation program with which
you specify the path (Borland's programs often use this method).

I've seen several utilities that will give you path-search for data
files, but I've found them of limited use.  It's annoying to pull up a
junk file from another directory when you really wanted to create a
new one in the current directory.  With extra functionality comes
extra problems.

jim frost
madd@bu-it.bu.edu

cramer@optilink.UUCP (Clayton Cramer) (03/21/88)

Since several people seem to want to know the answers:


> In article <3aee6925.44e6@apollo.uucp> nelson_p@apollo.uucp writes:
> >
> >  Is there any way to create batch files that don't echo 
> >  their contents to the screen?  If I precede the other 
> >  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
> >  'ECHO OFF' gets echoed!   
> > 
> 	Hey, anyone who knows the answer to this gives me a response too,
> will ya? Thanx

In DOS 3.3, you can preceed any batch file command with an @ sign to
disable echo -- so you start out a batch file you want to run silently with
@ECHO OFF.

> 
> >  Why does the PATH command only apply to some kinds of files
> >  and not others?   If you're going to have a 'where to look'
> >  feature for the computer why limit the types of files it 
> >  applies to? 
> 
> 	Hummmm, Dos 3.20 has been good to me in that it does look
> through the whold path for a file to be executed. One thing though,
> when an executable looks for a "slave" file (like an overlay),
> it doesn't even know that the path exists!!!
> 
> Fai Lau

Smart programs know to you look at Argv[0] to get the starting program's
home directory.  Stupid programs should be able to work with the APPEND
command in DOS 3.3.  It is supposed to allow a list of directories to
be searched for data files.

Clayton E. Cramer

croft@spked.UUCP (Steve Croft) (03/22/88)

In article <3aee6925.44e6@apollo.uucp> nelson_p@apollo.uucp writes:
>
>  Is there any way to create batch files that don't echo 
>  their contents to the screen?  If I precede the other 
>  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
>  'ECHO OFF' gets echoed!   

DOS 3.3 not echo commands that are preceded with "@"...   hence
       @echo off
will not get echoed.

steve
...ucdavis!csusac!athena!crofts

njh@root.co.uk (Nigel Horne) (03/23/88)

Cliff Joslyn writes:
>>>  Is there any way to create batch files that don't echo 
>>>  their contents to the screen?  If I precede the other 
>>>  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
>>>  'ECHO OFF' gets echoed!   
>
>C:> x.bat > nul
>

That doesn't help is the file is \autoexec.bat.......

-Nigel
-- 
--
Nigel Horne, Director of Quality and Programmes, UniSoft Ltd.
<njh@root.co.uk>	G1ITH	Fax:	(01) 726 2750
Phone:	+44 1 606 7799 Telex:	885995 UNISFT G	BT Gold: CQQ173

palmer@oodis01.ARPA (Jim Palmer) (03/23/88)

In article <9429@sunybcs.UUCP> ugfailau@sunybcs.UUCP (Fai Lau) writes:
>	Hummmm, Dos 3.20 has been good to me in that it does look
>through the whole path for a file to be executed. One thing though,
>when an executable looks for a "slave" file (like an overlay),
>it doesn't even know that the path exists!!!

MS-DOS (Don't know about PC-DOS) 3.2 added an external command APPEND.COM
which works just like PATH only it's the 'path' which is searched for overlay
files.  Works great.  Finally I can use Wordstar from every directory on my
harddisk!  Try it, you'll like it.   (I promise not to say RTFM 8^)  oops . .

Flames regarding {Ne,Wo}rdStar may be directed to /dev/null
-- 
Jim Palmer - Manufacturers And Gov't Interconnected by Computers (It's MAGIC!)
I'm in the High Fidelity         /###\    ARPA: palmer@oodis01.arpa
 First Class Travelin' Section  @ o o @   UUCP: ihnp4!lll-tis!oodis01!palmer
  I think I need a Lear Jet.     \ L /    SNAIL: OO-ALC/PMXD Hill AFB, UT 84056

murillo@sigi.Colorado.EDU (Rodrigo Murillo) (03/27/88)

In article <556@root44.co.uk> njh@root.co.uk (Nigel Horne) writes:
>Cliff Joslyn writes:
>>>>  Is there any way to create batch files that don't echo 
>>>>  their contents to the screen?  If I precede the other 
>>>>  commands in the .BAT file with 'ECHO OFF' then the @#&%*!
>>>>  'ECHO OFF' gets echoed!   
>>C:> x.bat > nul

>That doesn't help is the file is \autoexec.bat.......

Doesn't anybody try solutions before posting them?  The above solution
won't help any batch file run 'quiet'.  It simply does not work.

May I humbly suggest that you verify that posted solutions work before
posting them.  Its like posting crapped out code to binaries.  You
waste your time, my time, and the nets time (and money)

The recently posted solution for getting the current directory in
to a envar does not work either.  (see followup)

-- 
_______________________________________________________________________________
 Rodrigo Murillo, University of Colorado - Boulder  (303) 761-0410 
 murillo@boulder.colorado.edu | ..{hao|nbires}!boulder!murillo
 ( Machines have less problems.  I'd like to be a machine. -- Andy Warhol )