home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / ibm / pc / misc / 15785 < prev    next >
Encoding:
Internet Message Format  |  1992-12-14  |  1.8 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!caen!destroyer!news.iastate.edu!iscsvax.uni.edu!kraai4712
  2. From: kraai4712@iscsvax.uni.edu
  3. Newsgroups: comp.sys.ibm.pc.misc
  4. Subject: Re: How to create a "more" batch file?
  5. Message-ID: <1992Dec14.162702.9385@iscsvax.uni.edu>
  6. Date: 14 Dec 92 16:27:01 -0600
  7. References: <1992Dec11.235700.19707@mnemosyne.cs.du.edu> <gilligan.724122440@cs1.bradley.edu>
  8. Distribution: na
  9. Organization: University of Northern Iowa
  10. Lines: 35
  11.  
  12. In article <gilligan.724122440@cs1.bradley.edu>, gilligan@cs1.bradley.edu (Edward Henigin) writes:
  13. > In <1992Dec11.235700.19707@mnemosyne.cs.du.edu> mrosen@nyx.cs.du.edu (Michael Rosen) writes:
  14. >>Is there a way I can write a batch file that will allow me to type 
  15. >>more file.txt
  16. > more < file.txt
  17.  or
  18. > more < %1
  19.  
  20. Assuming you are successful in executing the batch file, it will throw you into
  21. some effectively infinite recursion.
  22.  
  23. Here's how to fix it.
  24.  
  25. 1)  Make sure that your MORE.BAT is ahead of your MORE.COM in your PATH.
  26. 2)  Give your MORE.BAT the full path to MORE.COM.
  27.  
  28. For example:
  29.  
  30. MORE.BAT
  31. -----------------------------------
  32. C:\DOS\MORE < %1
  33.  
  34. Of course this still wouldn't work of C:\DOS was your current working
  35. directory, it would get the MORE.COM before it began searching the path.
  36.  
  37. To combat these problems, it would suffice to create a batch file with a
  38. different name than MORE, so there wouldn't be any danger of tripping the
  39. MORE.COM or of entering some non-ending recursion in a batch file.
  40.  
  41. If you want a way to type multiple filenames with pauses in-between, let me
  42. know and I'll put it together for you.  It involves some intentional batch-file
  43. recursion and is IMHO, very interesting.  It's exposed in the User-to-User
  44. column of a recent PC Magazine.
  45.  
  46. Hope this complicated things hopelessly.  :-)    --jim
  47.