LFNCHK.BAT
~~~~~~~~~~~~
Purpose of this file:
If you don't have your own CD-writer, and you have to ask someone, who has
one, to write your CDs, then - depending on the skills of that person and the
capabilities of the CD writer software - you may notice some programs won't
work on the CD!
Why?
Because the filenames in the CD file system are limited at a maximum lenght of
64 characters (61 chars for the name and 3 chars for extension). If the CD
writer software can't warn you, when your files has longer names, or this
feature is disabled by misunderstanding of the person, who writes the CD for
you, then your filenames will be truncated at the maximal lenght. However,
some programs still want to open the file with the original filename, which is
not found. For example, this is the case, when you have MP3s on your harddisk,
with fully detailed filenames (author - song title - version/mix), this can
easily exceed the 64 chars (but this is not problem, because Windows 95/98/NT
can handle filenames up to 255 chars long.) A playlist also contains this long
name, and it's working fine. But when you write the whole thing onto a CD, and
you want to run the playlist, some files can't be found.
So it's good to check long filenames and correct problems BEFORE you make an
(almost) unusable CD...
This "program" is written to solve this problem, with no special program: it
uses the capabilities of the DOS!

Usage of the program:
Edit the LFNCHK.BAT file with any text editor, and write as many '?' chars
after the 'dir' command, as long filenames you want to filter. Here filename
will contain the dot '.' between name and extension, so it is longer by 1.
So to find the files with 64 chars or longer name, type 65 piece of '?' and
one '*'. (Note: if possible, use a fixed width font in the editor.)
Then save the new file, and run it with a command line parameter, which is
the drive letter to scan. (Note: run it from a DOS window.)
To scan entire drive C, type: LFNCHK.BAT C:
To scan MP3 dir with its subdirs on drive D, type: LFNCHK.BAT D:\MP3
You will be asked if you want to view the matching files (press Y) or want to
quit (press N). (Note: after 10 seconds the program will automatically quit.)
For later use, the list is available in the file 'TOOLONG.LFN' placed in the
current directory, from which you ran LFNCHK.BAT. (Note: if no files found, a
zero byte long TOOLONG.LFN will be created, delete this!)

System requirements:
Windows 95, Windows 98 or Windows NT operating system (DOS 7.0 or newer),
and the files MORE.COM and CHOICE.COM (located in a path directory.)
(Note: When you run the program under MS-DOS 6.22 or older, you will get ALL
files instead of matching files, and with SHORT names instead of long names
in the result!!!)

Errors:
There is no error handling in this file at all! So the following circumstances
may cause errors while running:
- wrong version of DOS (MS-DOS 6.22 or earlier)
- missing MORE.COM or CHOICE.COM (usually part of Windows\Command directory.)
- not enough space on examined disk for list file
- can't write listfile into current directory (try not to run from a CD!)
- file system errors (run SCANDISK for Windows to correct.)
Only the file system errors can endanger your data (writing to a disk with
file system errors may cause overwriting data! Use Scandisk!)

I am not responsible for any damages caused by this program, or by its
misusing.
bshng@sparta.banki.hu
