FILEID.EXE
File identifier v2.4 created by S. Groeneveld 1999.

ABOUT
=====
FILEID.EXE is a DOS command-line utility that identifies files. Different
file types are displayed in different colors. For many formats it's possible
to gather extra information from the file. An errorlevel is returned
indicating the last recognized format. Wrong file extensions can be corrected
automatically. This release is freeware but not registered. Registering is 
free, because I just try to encourage you to contact me and send some 
feedback (read the FREEWARE.TXT file).


REQUIREMENTS
============
The following system configuration is the minimum needed:
  * DOS 3.0
  * 80286 processor
  * 250 kb free conventional memory
Note that it is possible to compile FILEID for the 8086 processor. If you
need it, just contact the author. For smaller (better optimized) code I
chose for 80286 code generation. I've used a 80286 with monochrome monitor 
for quite a long time, and I know that programs demand more and more. That's 
why I want this program to run on older systems as well.


PROGRAM USAGE
=============
At the DOS-prompt type: FILEID [<filespec>] [<options>]
<filespec> and <options> are optional parameters. At program startup FILEID 
will first read the color settings from the FILEID.CLR file, then the 
default parameters from the FILEID.INI file and then read the command-line. 
See the FILEID.INI and FILEID.CLR files for more information.
Without <filespec> FILEID will check all files in the current directory.

<filespec> = (Multiple) file specification(s), wildcards are allowed
<options>  = Any combination of the options listed below

Example:  FILEID f1.txt f2.txt /A


OPTIONS
=======
All options are preceded by a slash (/). You can use the full option keyword
(recommended in INI file), or the single letter shortcut. If you specify a 
+ or - sign just in front of the option keyword or letter, you can turn an 
option on or off (for example, if you want to disable an option specified in 
the INI file).

Keyword     Short   Description
-------     -----   -----------
HELP        ?       This will display a brief help page explaining the 
                    program usage and options.

ATTRIB      A       Display file attributes. Active attributes are shown as 
                    bright capitalized single letters:
                    R = read-only, A = archive, H = hidden, S = system

COMPILER    C       Display compiler or 'owner' information for executables.
                    For example, ARJ self-extracting, PKLITE compressed 
                    or Borland Pascal executables.

DESCRIPTION D       Use the 4DOS description if it exists, otherwise display 
                    regular FILEID information. It's wise to enable this 
                    option, because it will give more specific information 
                    on most files. Descriptions will be enclosed in 
                    apostrophes (").

DESCRIPTALL DA      I noticed that some programs (eg. QPV) put their own 
                    codes in the description file, preceded by a ASC(4) 
                    character. These codes don't make much sense so I decided 
                    to ignore them (4DOS ignores them too). However, if you 
                    are really interested in these codes use this (bonus) 
                    option.

EXTENSION   E       With this option, extensions are automatically changed
                    if they are not the default for the recognized format.
                    It will preserve Windows 95 long filenames. Only formats
                    that have a reliable signature will support this option,
                    and executables are not affected. Without the /E and /N
                    options FILEID will prompt the user whether to rename the
                    file or not. Use this option only if you know what files
                    are going to be renamed, since many programs use their
                    own extensions for graphic or audio files. Note that
                    in Windows 95 the renamed files are displayed again, so
                    the summary will list too many files.

HIDDEN      H       Include hidden and system files/directories in list. 
                    Opening system files for reading should not be harmful 
                    to the system, and I have never experienced any problems
                    with it. However I cannot be held responsible for any 
                    damage to system files.

INFORMATION I       Display a summary after the list, containing the total
                    amount of files, subdirectories and bytes processed.

KILLNULL    K       With this option, zero length files will automatically 
                    be erased. Without the /K or /N option FILEID will 
                    prompt the user whether to keep the null file or not.
                    Use this option only if you know what files are going to 
                    be erased. Some programs create and USE zero length files.

LINEUP      L       Align the file extensions. No dot is displayed to
                    separate name and extension.
                    
MONOCHROME  M       Disable all colors. All output will be in NORMAL color.

NOPROMPT    N       This will prevent FILEID from displaying prompts to the
                    user. Default answer will be 'No' unless the /E or /K
                    option is also specified. 

OUTPUT      O       Normally output is printed directly to the screen and 
                    thus can't be redirected. With this option FILEID will
                    write to the standard output device (via DOS).
                    Colors, pause and prompts are disabled automatically.

PAUSE       P       This will cause FILEID to pause after a full screen,
                    so that you can even read the information with longer
                    directory listings. 'Full screen' defaults to 25 lines,
                    but you can change this in the INI file.
                    Turning on this option disables standard device output.

TIPSKIP     T       Do not display a tip on the last line. Tips can be 
                    useful, but after a few times they may start bothering 
                    you. This is the only option that has been disabled in 
                    the unregistered freeware version.

VERBOSEx    Vx      Set amount of information, x = [0-4] (see below)

WIN95       W       Display long filenames instead of file information. This
                    is only possible when running under Windows 95/98. The
                    filenames will be enclosed in apostrophes ("). 
                    You might want to use /-D to disable 4DOS descriptions.
                    For quicker results you should also combine this option 
                    with /V0 because files don't need to be opened for 
                    information.



VERBOSE0    V0      Determine filetype according to extension only! Files 
                    will NOT be opened for a signature check. This is a good 
                    and quick replacement for the DIR command. The old option
                    /0 still works as well.

VERBOSE1    V1      Display short information on filetypes. This will cause 
                    FILEID to only check the signature and display filetype 
                    without any extra information.

VERBOSE2    V2      Default - Show extra format-related information

VERBOSE3    V3      Display extra (sometimes more technical) information for 
                    some file formats.

VERBOSE4    V4      This will show as much as information as possible. Also
                    information that requires quite some time to obtain is
                    only shown with this option turned on. For now, this 
                    affects only a few formats. For example, with DOS 
                    executables it will display overlay info.


TECHNICAL INFO
==============
FILEID.EXE is programmed and compiled in PowerBasic v3.2. The original 
executable was 180kb but I compressed it with PKLite v2.01 to 80kb, which
you can check with the /C option...  ;-)
For each file, the program first looks if it recognizes the extension. Then
will be checked if the signature matches this extension. If it doesn't, the
file will be scanned for all known signatures. If the file matches none of 
them, it will be checked for being a plain textfile.
The program changes the application title of the MS-DOS window in Windows 95.

Programs that have aided me a lot:
    File identifier from FeFe software v2.0
    Hacker's viewer v6.0
    File Formats Encyclopedia


NOTES
=====
Some remarkable file formats:

.DOC .XLS .PPT
MS Word, MS Excel and MS Powerpoint files use the same signature. Therefore
this signature will now signal a 'Microsoft Office' file and the extension 
is used to determine which of the three types is most likely.

.EXE
Executables exist in all shapes and sorts, and it's very hard to find out 
how all compilers put them together. FILEID recognizes the signatures of
a few compilers like Pascal, Turbo C, Microsoft C and of course PowerBasic.
Also the best-known compressors are identified, such as PKLite, LZexe,
EXEPACK and Diet. However there are much more compilers and compressors than 
I know, so many DOS executables will not show any compiler info at all.

.MOV
This format has been added recently. I noticed that with some movies FILEID
cannot determine the width and height. Any experience with detecting 
QuickTime movies is welcome.

.MP3
I am amazed how they put so much information in so few bytes. The header
exists of only 4 bytes (I'd rather call it '32 bits'), of which 11 bits are 
used just for identification (all set to 1). With the remaining 21 bits it's
possible to find out: MPEG version, layer (MP3, MP2...), sample rate, sample 
size, stereo/mono/2-mono, original flag, copyright flag, and even more... 
This surely is a compressed sound file :)

.MPG
Mpeg movie files are in fact data streams with no specific header. Most MPG
files will not be recognized. Maybe in a future version I will just go for 
'extension trust' recognition for this type.

.HLP
The windows help file format is terrible! It IS possible to find the title 
of the help window, but only by seeking, reading and searching around in the
file, and even then I cannot always determine the right offset of the title 
string. Microsoft has never published the HLP format, and the information I 
got has been gathered by someone who dumped over 500 HLP files and tried to
figure out all byte meanings.

.FLI
Animation speed for Flic files is expressed in 'delay per frame'. The problem
is that it's not clear to me what unit is used. Some sources say it is milli-
seconds, other sources say it is screen refreshes. The former makes more 
sense to me, the latter gives more rational results. It is possible that the
calculated animation time is not correct.



CONTACT THE AUTHOR
==================
If you have any questions, comments, compliments :), bug reports, wishes, 
ideas or just are interested in getting your own free 'registered' version,
or if you know a file format that you would like to see in a future version,
please contact me:
    Sebastian Groeneveld
    dracuul78@hotmail.com
    http://dracuul.tripod.com/

You can also make a telnet connection to:
    nanvaent.org    (port 3000)
and look/ask for a player named Dracula, Crossbow, Bugs, Bozo or Spooky.

The latest freeware version will be obtainable from the following site:
    http://www.geocities.com/dracuul78/download/

