Mail Archives: djgpp/2000/02/13/21:42:28
Eli Zaretskii wrote:
>
> On Fri, 11 Feb 2000, John & Susie wrote:
>
> > This is a sampling of the output (tmp.txt) run in DOS 6.x (d: is a 450~
^^^^^^^^
> > MB FAT16 partition)
>
> On what operating system did you run that program? If that was
> Windows 9X, is it possible that you had LFN set to N in the
> environment?
No - Dos6.2 -- see above (also compiled in DOS6.2). This partition is
visable to NT or DOS6.x only.
>
> FWIW, I ran your program under Windows 95 on two large disks, and
> didn't see even a single RHSV entry. There are several RHSA files,
> which is expected (these are real hidden files used by several
> utilities and by Windows itself), but no RHSV.
>
> > d:./Bg: 4294967295 RHSV <<---------------????
> >
> > The problem: The files flagged <<------- ??? don't exist!
>
> Of course, they don't exist: these are fake directory entries used by
> Windows to store the long file names. Several such entries are needed
> to store a long file name, since there's space for only 13 characters
> (Unicode-encoded) in each standard FAT 32-byte directory entry.
> Windows sets the attribute byte of such ``files'' to the impossible
> combination "RHSV" (read-only, hidden, system, and volume) because
> most DOS programs disregard files with such a crazy combination of
> attribute bits.
Yes, they appeared to be garbage (in DOS) but I didnt know if the 'V'
was something I should pay attention to. I dicovered shortly after that
'D' refers to a directory, I should have looked more closely before
posting.
>
> But I'm curious how did you get those entries visible from a DJGPP
> program. If you didn't set LFN=n in the environment, the only way I
^^^^^
No I dont set it, isn't 'LFN=n' automatic if running under native
DOS6.x?
> could imagine this to happen is if you had some files that were
> created under Windows, but then deleted under DOS. This would leave
> behind the extra directory entries used by Windows, because DOS system
> calls don't see them and don't remove them. If you run SCANDISK
> (under Windows) on that partition, it would probably complain about
> all those entries and suggest to delete them.
The partition was created with Partition Magic 5.0. Some of the files at
least were downloaded from the web directly to the FAT16 partition
running under NT. The deletes could have been in NT or DOS6.x, I dont
remember which, but your explanation makes sense. I boot directly into
DOS6.x when needed as DOS7 (especially NT's version) isn't my idea of
DOS.
>
> To make the long story short: programs that walk directories need to
> skip files which have all of RHSV bits set in the attribute byte.
> (Library functions like `stat' took quite a few iterations to get
> there ;-)
I ran NT's 'disk checking' on the partition and it showed no errors.
Using NT I could easily copy the good files elsewhere, reformat the
partiton and then copy them back, but is it something that needs
corrected?
Thank you for the reply,
John
- Raw text -