#include<dos.h>
#include<io.h>
#include<stdio.h>
#include<stdlib.h>

void main() {
 char new,all;
 char str[100];
 unsigned fa;
 struct ffblk ffb;

   if(findfirst("H:\\MAIL\\*.msg",&ffb,0)) {
            printf("No Mail");
            exit(0);
            }
    new = 0;
    all = 1;
    sprintf(str,"H:\\mail\\%s",ffb.ff_name);
   _dos_getfileattr(str,&fa);
   if(fa & FA_ARCH)  new++;
   while(!findnext(&ffb)) {
       sprintf(str,"H:\\mail\\%s",ffb.ff_name);
       _dos_getfileattr(str,&fa);
       if(fa & FA_ARCH) new++;
        all++;
        }
  if(!new) printf("You have %i piece(s) of mail",all);
  if(new) printf("You have %i piece(s) of mail, %i NEW",all,new);
}

