I have to create a listing of the files contained inside a specific directory, I have done the code below(part of a bigger programm), but I would like my programm to ignore any possible folders that could be included inside the directory.

```
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>

int main ()
{
  DIR *dirptr;
  struct dirent *entry;     
  dirptr = opendir ("synchedFolder");

  if (dirptr != NULL)
  {
    while (entry = readdir (dirptr))
     {
         if(strcmp(entry->d_name,"..")!=0 && strcmp(entry->d_name,".")!=0)
          puts (entry->d_name);

     }

    (void) closedir (dirptr);
  }
  else
    perror ("ERROR opening directory");

}

```