The directory filenames. -rw------- 1 blahblah student 0 Feb 20 14:31 her -rw------- 1 blahblah student 0 Feb 20 14:31 hi -rw------- 1 blahblah student 0 Feb 20 14:31 him lrwxrwxrwx 1 blahblah student 2 Feb 20 18:45 linktome -> me -rw------- 1 blahblah student 0 Feb 20 14:31 me -rw------- 1 blahblah student 0 Feb 20 14:31 you CODE snippet... if (!stat( filepathname, &statdata)) { if (S_ISLNK(statdata.st_mode)) { //THIS TELLS ME THAT linktome is a FILE and not a LINK (although it clearly has an l tag) printf("The object %s is a soft link\n", dentry->d_name); } else if (S_ISDIR(statdata.st_mode)) {//WORKS FINE printf("The object %s is a directory\n", dentry->d_name); } else {//WORKS FINE printf("The object %s is a file and will be copied\n", dentry->d_name); } }