Article 3492 of microsoft.public.win32.programmer.kernel: Raiford, > if( ffd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY ) > { > > > The following situation is for directories only... files seem to work. > > Can someone explain why ffd.dwFileAttributes returns the correct val (16) > when used on one drive only to have it return 2064 (0x810) on another drive. > I dont even know where 2064 is defined. 2064 == 2048 + 16 == 0x800 + 0x10 == FILE_ATTRIBUTE_COMPRESSED | FILE_ATTRIBUTE_DIRECTORY. Your test should read: if ( ( ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) != 0 ) The comparison against 0 is redundant, but I like to make things clear. Anyway, note the bit-wise AND in there. Cheers, Felix. -- If you post a reply, kindly refrain from emailing it, too.