🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #10307

Re: How to create a "more" batch file?

#10307
From: kraai4712
Date: Mon, 14 Dec 1992 22:27
35 lines
1863 bytes
In article <gilligan.724122440@cs1.bradley.edu>, gilligan@cs1.bradley.edu (Edward Henigin) writes:
> In <1992Dec11.235700.19707@mnemosyne.cs.du.edu> mrosen@nyx.cs.du.edu (Michael Rosen) writes:
>>Is there a way I can write a batch file that will allow me to type 
>>more file.txt
> more < file.txt
 or
> more < %1

Assuming you are successful in executing the batch file, it will throw you into
some effectively infinite recursion.

Here's how to fix it.

1)  Make sure that your MORE.BAT is ahead of your MORE.COM in your PATH.
2)  Give your MORE.BAT the full path to MORE.COM.

For example:

MORE.BAT
-----------------------------------
C:\DOS\MORE < %1

Of course this still wouldn't work of C:\DOS was your current working
directory, it would get the MORE.COM before it began searching the path.

To combat these problems, it would suffice to create a batch file with a
different name than MORE, so there wouldn't be any danger of tripping the
MORE.COM or of entering some non-ending recursion in a batch file.

If you want a way to type multiple filenames with pauses in-between, let me
know and I'll put it together for you.  It involves some intentional batch-file
recursion and is IMHO, very interesting.  It's exposed in the User-to-User
column of a recent PC Magazine.

Hope this complicated things hopelessly.  :-)    --jim
Technical Details
Message-ID: <1992Dec14.162702.9385@iscsvax.uni.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!destroyer!news.iastate.edu!iscsvax.uni.edu!kraai4712
References: <1992Dec11.235700.19707@mnemosyne.cs.du.edu> <gilligan.724122440@cs1.bradley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!destroyer!news.iastate.edu!iscsvax.uni.edu!kraai4712
From: kraai4712@iscsvax.uni.edu
Newsgroups: comp.sys.ibm.pc.misc
Subject: Re: How to create a "more" batch file?
Message-ID: <1992Dec14.162702.9385@iscsvax.uni.edu>
Date: 14 Dec 92 16:27:01 -0600
References: <1992Dec11.235700.19707@mnemosyne.cs.du.edu> <gilligan.724122440@cs1.bradley.edu>
Distribution: na
Organization: University of Northern Iowa
Lines: 35