home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d478
/
newlist
/
newlist.doc
< prev
next >
Wrap
Text File
|
1991-04-18
|
14KB
|
308 lines
NewList 4.9
by
Phil Dietz
10542 Cuming Street
Omaha, Nebraska
68114
16-Mar-91
This is TuitionWare. Send a buck to help me get through college.
(It's only a buck. It's not like 35.00 that some dingos ask for.
If ya can't afford a buck, send a floppy. Their equal currency
to me. :-) One buck for unlimited updates. One buck for a
REAL list program. One buck and all of your enhancements will
come true. SUBLIMINAL HINT: B U C K
What is Newlist?
AmigaDOS is great. It not only allows you to manipulate files
graphically VIA workbench, but it also allows you to manipulate
files on a command line basis. Commodore utilized the command
line interface by offering powerful commands to help the user
do what he wants to do. One of the handiest is LIST. It not only
gives a directory listing of names, but also offers filesizes, file
protection, and file creation.
But LIST isn't perfect. It doesn't offer much sorting. It doesn't
offer much date manipulation. It doesn't allow name filters, so
immense directories HAVE TO BE shown. TRUE, LIST is small, but
sometimes POWER comes first.
What does that mean?
NewList offers the SPEED of list, and the POWER of a database.
Now directories can be sorted not only by name, but also by size or
date. Now directories can be sorted through an alphabet filter
so only certain files will be shown (like D through G). A quick
option has been added to utilize the screen space, so no more
2 column output by MR. dir. :-) Are you tired of the date format?
Now you can create your own!
Ain't it like LS?
Well sorta. LS and LS-jr are very good LIST replaements. They
are quick and offer UNIX compatibility. That's about it
though. Newlist is JAM PACKED with options. With NewList, the
user is given processing power. You can sort a directory the way
YOU want it.
NewList was designed around speed- algorithim,
structure selection, and all. Every type of area was analyzed;using
trees, lists, hash tables, AmigaDOS structures, the whole tomato.
Only the fastest and smallest 'c' structures were allowed.
The only restriction was the 'c' Compiler itsself. Lattice 5.10
should come closer to the GOD-LIKE ASSEMBLER level....
Features of NewList:
1) It's PURE! NewList is REALLY quick if it's resident.
2) Very fast algorithms.
3) Completely dynamic.
4) Tons of sorts and filters (including the needed BY DATE!)
5) Full UNIX WILDCARD (n*l*s? = newlist) and character filtering.
6) A slick date construction kit with 5 premades.
7) ANSI.
8) a slick multi-columnar quick option to utilize screen space.
9) ENV: support!
10) Tons and Tons O' Flags and Switches!
Usage: NewList ?
NewList 4.9 by Phil Dietz NCEMRSoft
NewList [FLAGS ie. -q -v] <path and wild>
o Overlook ENV:NEWLIST a Dont use Today, Yesterday, etc.
b Display Blocks k Display Disk Keys
d01234 Five Date/Time Formats. df "string" Custom Date. See docs
r Displays list in REVERSE n Displays COMMENTS
s Sort by Name ss Sort by file Size
sd Sorts by Date sc Sort by Comment
h No header i Ignore .info files!
gd Show ONLY dirs gf Show ONLY files.
gb Show BOTH dirs/files grouped u Show DEVICE: usage info
fA Files start with A tZ Files go to Z
c CASE sensative with -f -t z LS style directories
q Quick option! qs Quick Option with FileSizes!
v Vertical sort quick columns
y # Use # columns for quick l # Show files made in last # days
NOTE: each flag must have a - identifier. ie -q -sd -i -z -l 20
FLAGS IN DEPTH:
[-o] When you want to OVERLOOK the ENV:NEWLIST variable. Using
[-o] instead of another overriding flag yields the normal
print-as-being-read format.
[-a] Forgets about the TODAY, YESTERDAY, bologna.
[-b] [-k] Instead of the default display of filesize, newlist will
instead display BLOCKS or DISKKEYS respectively.
[-d01234] Five different pre-made date formats ranging from the
fully expanded 1st grade letterhead (Friday, November 9, 1990,
05:30:24 PM) to the default LIST format to slashes, dots,
and dashes to DateStamp values.
[-df] Allows you to create your own Date format. The format is
-df "DATE STRING". Mark RinFret offers an easy to use Date
maker, so I added it. Here are the flags available:
y => year minus 1900
Y => full year value
m => month value as integer
M => month name
d => day of month (1..31)
D => day name ("Monday".."Sunday")
h => hour in twenty-four hour notation
H => hour in twelve hour notation
i => 12 hour indicator for H notation (AM or PM)
I => same as i
n => minutes (sorry...conflict with m = months)
N => same as n
s => seconds
S => same as s
t => prints TODAY, YESTERDAY, or Day of the week if applicable.
If the file doesn't fall in the last week, it will be
blank.
Simply make a C string like printf.
-df "Date: %02d-%M-%02y at %02h:02n:02s"
yields
Date: 11-Jan-90 at 01:03:20
It's Easy. If you are daring you can even include ANSI codes for spice.
[-r] Displays a list in REVERSE from top to bottom. WHY? Simple.
Instead of waiting for the whole list to scroll by to see a
file at the bottom, you can reverse the list and crtl-c to
stop quick! It's also handy when sorting by date. All of
the newest files will be displayed first.
[-sn] Sorts files alphabetically. A synonym is just [-s].
[-ss] Sorts files by file size.
[-sd] Sorts files by date of creation. Very handy!!
[-sc] Sorts by Comments. If you use FileNotes wisely, you can
have your directories be grouped by file type. Simply
add a filenote to each file and give it a type (Picture, GIF,
Utility, NoiseTracker, etc.) Now when you view by [-sc],
the files will be together!
[-gd|-gf] Groups the display so ONLY dirs or ONLY files are shown
respectively. This is an option of LIST I had to add.
[-gb] Shows BOTH directories and files. Output is similar to DIR.
[-u] Shows bytes FREE and bytes USED on disk. Now you can get
all your needed info with one command, instead of a "dir
list info" combo. Note: due to RAM:'s variable size,
the bytes free will be zero.
[-n] Do you hate seeing those huge FILENOTES destroying your
directory list? This flag will toggle if you want to see them.
If not present, a simple "Comment" will be shown to tell you
"hey mister, you can read me if you wanna."
[-h] Doesn't display the header file.....ohhhhh.....big deal!
Well it does seem off place in the -q quick directory, so
it might help. Another LIST option (holy cow!)
[-c] When using the letter filters, this flag will also take into
affect the CASE of the filter letter. So now only upper or
only lower case files can be displayed.
NOTE: [-fA] or [-tZ] must be set to an alphabetic character
to utilize case sensativity! The default letters are
SPACE and, so [-c] will not work unless you change them!
[-fA] The MINIMUM letter for the filter. Let's say you only want to
view files greater than or equal t. Simply set -ft. Very
handy for printing lists where you left off the night before.
Remember -f as FROM A
[-tZ] The MAXIMUM letter for the filter. Only files less than or equal
to the letter will be shown. To see files h through l
simply set -fh -tl.
Remember -t as TO Z
[-i] Ignore .info files!
[-l #] Show files last made since # days ago.
Now you can view files that were made in the last two weeks
without viewing a whole directory. (ie newlist -l 14)
[-y #] Force # columns to [-q] quick option. Use this option when
re-directigthe output to a WIDE printer. ie. to utilize a
printer with 20 pitch type, use newlist >prt: -q -y 9 dh0:
[-q] Gives a QUICK and easy listing of the directory. The entire
screen will be utilized and multi-columns will be created.
Because of its simplicity, not all of the flags are usuable.
Names will be white, and directories will be another color.
NOTE: some flags won't work properly with [-q]. I'm still
adding -gb -gd -gf -f -t and -c...
[-qs] Quick option WITH file-sizes! A very very handy option very
similar to DIR, but with multi-columns. Note: if you'd rather
see blocks or keys instead, simply use -b or -k with it.....
<path> the directory to view. Wildcards are supported. (Yes, UNIX style
and yes, complex. ie. *ew?is* = newlist)
All of the flags and path can be used in any order.
newlist dh0:*.c -s -r = newlist -s dh0:*.c -r
All of the flags can be used together (-q has exceptions):
You can view a directory through a case sensative character filter,
of files made in the last 2 weeks, sorted by date in reverse order,
showing block size , with a custom dateformat string,
hiding .info files, and using a UNIX wildcard.
Environment Variable support:
ENV: variables are NOW supported (just like I said I would). Now
long customized argument lists can be spared! The variable
ENV:NEWLIST contains any flags you want to have automagically set upon
initiating newlist4. To utilize the env: support, use ED
or CED and create ENV:NEWLIST by typing in the flags you want
to have default (ie. -r -sd).
With ENV: comes a diminished return. Now if you want the standard
list type display (files out of order and displayed as they are read)
, then the new -o option must be used. An alternative is to simply
delete ENV:NEWLIST.
NOTE: to override the ENV:NEWLIST, you can enter [-o] or you can type
any different flag. Suppose ENV:NEWLIST is "-r -sd -d3",
to sort by size simply newlist4 -ss or newlist4 -o -ss
How to Create ENV: variables:
Make sure ENV: is assigned to a directory. Now use the Commodore
supplied command setenv. Here is an example of its use:
setenv newlist "-q -sd -r -i"
BUGS with AmigaDOS supplied LIST?
Yes, there are some bugs with list. One of THE biggest is that you
cannot name your directories PAT, KEYS, DATES, NODATES, SUB,
SINCE, SORT, TO, UPTO, QUICK, BLOCK, NOHEAD, FILES, DIRS, or
LFORMAT. The parser interprets them as flags and not your dir!
Technically you CAN name the directory to these statements,
but the only way to view the directory correctly is to CD to it
first!! I wonder why they didn't incorporate a simple -b flag instead
of the cumbersome BLOCK??
BUG with LS?
Besides the sloppy code, some of the UNIX ported material was not
thought-out in porting to the amiga. The ONE thing LS forgot about
was the one floppy user! The ONLY way to survive a dir was to type
dir myflopname:. A system requester would say insert myflopname: then
you'd insert the disk and click ok. Well, ls's error trapping
removes the requesters so the one drive user is doomed!
Oh well. Not to many of them left. Not me....! :-)
~~~~~~~~~~~~~~~~
Comments: First off. Rename newlist to nl (for newlist), stick it in
your c: directory, and PURE it. People use names that are short
and you know that you want to type nl instead of newlist.
Then edit your Startup-Sequence to make nl RESIDENT upon bootup.
(add RESIDENT c:nl or ARES c:nl, depending if you use ARP)
Enjoy. PLEASE send a buck. I need it. I'll be your friend...
If you'd like to join the National Organization NCEMRS
or NCEMRSoft please contact me. NCEMRSoft is a group of
programmers for the Amiga and Mac that share ideas, algorithms,
beers, etc. We ain't no lamer computer club. It just gives
you a title and a source for help and code optimization.
Members range come from U of Neb-Lincoln, U of Neb-Omaha,
U of Texas, MSstate, Iowa State, and others!
Keep in mind: this is a very useful tool. A tool that only
costs $1.00. It's a blue light special :-)
For quick response mail until May 10, 1991 to:
Phil Dietz -- NCEMRSoft or email to
442 Abel North 231b3678@fergvax.unl.edu
880 n 17th Street 235b5271@fergvax.unl.edu
Lincoln, NE 68508