C programming with directories and files

JC0133

Senior member
Nov 2, 2010
201
1
76
I have a curiosity question. Is there a way in the C programming language to navigate to different directories and find files?

Any ideas/advice on how to do this in Windows and Linux?
 

Gryz

Golden Member
Aug 28, 2010
1,551
204
106
dirent.h is the header in the C POSIX library for the C programming language that contains constructs that facilitate directory traversing. The function is not part of the C standard, but is considered "pseudo-standard" and is usually portable between platforms.

Just to get you started:
http://www.thegeekstuff.com/2012/06/c-directory/

https://en.wikibooks.org/wiki/C_Programming/dirent.h

I got no experience programming for Windows. So I have no idea if dirent.h is actually usable on Windows or not. But you can try.