home *** CD-ROM | disk | FTP | other *** search
- Short: run a command with a randomly chosen file
- Type: util/rexx
- Uploader: ac368@leo.nmc.edu
- Author: ac368@leo.nmc.edu (Bill Bereza)
-
-
- rndfile.readme
- $VER: rndfile.readme 1.31 (4.5.94)
-
- By Bill Bereza bereza@beech.csis.gvsu.edu ac368@leo.nmc.edu
-
- no longer contains any code from RXBlank by Brian C. Berg,
- but thanks for the idea!
-
-
- Installation:
- You'll need rexxarplib.library in libs: (It's available in many places)
- Then copy libs/RexxDosSupport.library to libs:
- (I included this because it isn't available everywhere)
-
- Then copy rndfile where ever you put you ARexx scripts.
-
- Usage: rndfile Paths/M,Pattern/K,Command/K,CmdOptions/K,ALL/S,DIRS/S,FILES/S
-
- You do *not* need to put a '/' at the end of the Path.
-
- Paths/M : Specify any number of paths for rndfile to search through.
- e.g. Work:Docs/
- Default is the current directory.
-
- Pattern/K : An Arp pattern for rndfile to apply to the
- list of files/dirs.
- e.g. s#?.txt
- Default is '~(#?.info)' No info files.
-
- Command/K : A program that rndfile will run on the chose file.
- e.g. PPShow
- Default is the enviroment variable DefRndCmd or 'c:list'
- You can set your own default command with:
- setenv DefRndCmd <command>
-
- CmdOptions/K: Options to pass to the Command program.
- e.g. SCREEN
- Defaults to null string. (Nothing)
-
- ALL/S : Allow directories OR files to be chosen.
- This is the default option.
-
- DIRS/S : Allow only directories to be chosen.
-
- FILES/S : Allow only files to be chosen.
-
- Examples:
- RX rndfile
- uses default command 'c:list' on a file in the current directory
-
- RX rndfile Sounds:Samples/ Pictures:Things Command=delete All
- uses delete command on a random File OR Directory in those dir
-
- RX rndfile Sounds:Samples/ Command=Multiview CmdOptions="SCREEN BACKDROP"
- uses Multiview program with SCREEN and BACKDROP options
- in Sound:Samples/
-
- Disclaimer: Don't blame me if you randomly screw something up.
- By executing this script you take your life and your
- files into your own hands.
-
- ObLegal: This script is freeware. Do what you like with it.
- If you use part of this, at least give me some
- credit|blame.
-
- History: 2.10 Just a few small additions.
- + You can now have multiple paths. (See Examples)
- + Now will read the default command from the env-variable
- DefRndCmd.
- 2.00 Hooboy! Completely re-wrote the program. It's like a
- completely new program.
- + Replaced ugly argument parsing structure with
- ReadArgs() from RexxDosSupport.library.
- + Now I use a real template.
- + Replaced '.info' removing routines with FileList()
- from rexxarplib.library.
- - Now also checks for ':' instead of just '/'
- No more 'Can't find Path SYS:/'
-
- 1.10 Fixed instructions/comments
-
- 1.00 I wrote this for the Amiga users on alt.tv.animaniacs
- so they could play a collection of 'Wheel of Morality'
- samples. Unfortunately, I wrote this before looking at
- the sample collection. This program is useless for that.
- But it did make a useful utility.
-
- ToDo: Some optimization should be done in the big 'do' loop.
- What more do you want? :) Send e-mail if you have a
- suggestion.
-
- Maybe get an ARexx compiler and compile it?
-
- I would like to use a better implementation of ReadArgs().
- I have one, but it would require a few changes.
-
-
- ============================= Archive contents =============================
-
- Original Packed Ratio Date Time Name
- -------- ------- ----- --------- -------- -------------
- 2912 1155 60.3% 04-May-94 08:40:16 rndfile
- 7563 3142 58.4% 04-May-94 08:50:38 rndfile.guide
- 3879 1624 58.1% 04-May-94 08:46:46 rndfile.readme
- -------- ------- ----- --------- --------
- 14354 5921 58.7% 16-Jun-94 08:55:32 3 files
-