0

I am new to C and It might be a simple question. I want to loop through filenames and ignore subfolder and its files. I have to display the files dirent information.

Please help me how to do it using C.

thanks,

  • 1
    Maybe something from here will help: [How can I get a list of files in a directory using C or C++?](http://stackoverflow.com/questions/612097/how-can-i-get-a-list-of-files-in-a-directory-using-c-or-c) – lurker Mar 20 '14 at 13:54
  • Search "readdir c exemple" on google, there are plenty of examples out there. – Jabberwocky Mar 20 '14 at 13:55
  • 1
    this is [very simple and efficient](http://stackoverflow.com/questions/4204666/how-to-list-files-in-a-directory-in-a-c-program) –  Mar 20 '14 at 13:55

1 Answers1

0

you need to access the files in a directory. read this answer it can give you good input. there are many questions relating to this concept of reading files in a directory in C in stackoverflow itself read those.

Community
  • 1
  • 1
LearningC
  • 3,182
  • 1
  • 12
  • 19