#include <stdio.h>
#include <io.h>
int main()
{
struct _finddata_t data;
long id = _findfirst("*", &data), ret = id;
while (ret != -1)
{
printf("name = %-20s, attrib = 0x%X, is_directory = %d\n", data.name, data.attrib, !!(data.attrib & 0x10));
ret = _findnext(id, &data);
}
_findclose(id);
return 0;
}