How to write C code to implement the DOS command "DIR"
View Single Post
It depends which operating system the program will be running on.
For Unix/Linux, look at the opendir(), readdir() and closedir() functions.
For Win32, it's FindFirstFile(), FindNextFile() and FindClose() functions.