Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   How to write C code to implement the DOS command "DIR" (http://www.go4expert.com/forums/write-c-code-implement-dos-command-dir-t7237/)

gates2010 10Nov2007 01:04

How to write C code to implement the DOS command "DIR"
 
Hi

I am trying to implement the DIR command for my client server proj. When the client sends a list command to the server the server should list all the files in the files directory which is located in the same place as the server program.

If you have an idea or u know any functions i could use pelase let me know

thank u :)

Salem 15Nov2007 17:13

Re: How to write C code to implement the DOS command "DIR"
 
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.


All times are GMT +5.5. The time now is 04:49.