home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fish 'n' More 2
/
fishmore-publicdomainlibraryvol.ii1991xetec.iso
/
disks
/
disk415.lzh
/
FileTypes
/
FileTypes.doc
< prev
next >
Wrap
Text File
|
1990-12-15
|
4KB
|
103 lines
FileTypes V2.1
FileTypes is a programme designed to identify different types of files (IFF,
executable) in a directory.
Usage: FileTypes [Directoryname|Filename] [e i d u]
or
FileTypes ?
(quick reference)
The programme will print the names of all entries of the specified directory
plus a type description. If the first name on the command line is a filename,
it will only print the type of that file. Names containing spaces (" ") must
be enclosed in quotation marks. If no name is specified, the contents of the
current directory (set using CD) will be printed to the screen.
Examples:
FileTypes df0:Data
will print a list of all entries in df0:Data plus type descriptions
FileTypes "df0:Data 2"
will print a list of all entries in df0:Data 2 plus type descriptions
In this version the programm can recognize IFF-files (all types) and excecu-
tables.
The key characters:
After the name of a directory or file one or more key characters (of e, i, d
and u) may be given. The programme will in that case only print files which
are of one of the types specified by the key characters. e means executable
(e.g a programme that can be run by typing its name in the CLI), i means IFF,
d means directory and u means unknown. N.B.: All key characters must be sepa-
rated by spaces!
Examples:
FileTypes df0:Data e
will print a list of all executable files in df0:Data plus their type descrip-
tion
FileTypes df0:Data e i
will print a list of all executable and IFF files in df0:Data plus their type
description
N.B.: The name of the directory or file MUST be the first parameter in the
command line! If you want to read the current directory with some key charac-
ters set, the filename must be given as an empty string ( "" ), or the pro-
gramme will consider the first key character to be the directory name.
Example:
FileTypes "" e d
will print a list of all executable and IFF files in the current directory
plus their type description
The length of the programme:
In the quick reference you will find the line
Lenght of this executable: xxxx Bytes (actual lenght depends on version)
This will give you the correct lenght of the executable file "FileTypes" as
for example printed by the CLI's List command. It is provided as a (far from
safe) protection from link viruses. If this length and the lenght given for
example by the List command are not the same then the executable has probably
been altered and you should scan your system for a link virus. However, the
correct length of the executable does not always mean it is clean, so be care-
ful!
My adress:
Sebastian Leske
Bergerhauserstr. 17a
4300 Essen 1
Germany/Deutschland
Bug reports, letters of thanks, contributions etc. are of course welcome
(haven't I read that already somewhere else?).
(I wrote this programme mainly for fun and for my own needs, so don't have a
bad conscience if you don't send money, but I would like a bit of feedback.)
PS:
This programme may be freely distributed and changed (especially improved!)
as long as my name is mentioned. If someone makes any changes, please send me
a note.
Enjoy!
Technical specifications:
This programme was written in assembly language and assembled using the
DevPac assembler V2.0 from HiSoft.
The programme identifies executable files if they start with the longword
$3F3. IFF files must start with the string "FORM", then the programme will
read the Bytes #8-11 and print them as the IFF type (that's why it can re-
cognize all IFF types).
I am not perfectly sure whether this is the correct way to check for the
types (especially the IFF standard is very complicated), so I would appreci-
ate any comments concerning that matter.