Message-ID: <38A6E6CB.D32F04B3@sgi.net> From: John & Susie X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: __file_tree_walk problem?? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 75 Date: Sun, 13 Feb 2000 12:15:55 -0500 NNTP-Posting-Host: 216.151.67.103 X-Complaints-To: abuse AT stargate DOT net X-Trace: news.sgi.net 950462190 216.151.67.103 (Sun, 13 Feb 2000 12:16:30 EST) NNTP-Posting-Date: Sun, 13 Feb 2000 12:16:30 EST Organization: Stargate Industries, LLC To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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