Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

!pleeeese help!!! how do i read a directory in DOS in C ?!!!!!!!

Status
Not open for further replies.

oreganr8

Programmer
Aug 6, 2001
7
GB
please help!! i really need a complete code (including header files)
to read a directory from DOS/windows in C

i can read in files easy - but dunno how to read directories..!
i need the programme really sooon

thankyou!
 
Dont understand read in a directory. to see what is in a directory change to the directory and then view the contents. an example would be dir then with the list of directories showing change to the directory you want to examine and dir again
C:\dir
cd windows
C:\<windows>dir
this would show all directories on the c: drive the cd windows tells it to change to the windows directory and the dir would show any folders in the windows directory.
If there are too many folders to fit on one screen you could use /w/p./w tells it to show in wide format /p tells it to pause if there is more than one screen full.
If there was a file then you could use type (filename and it would show what was in the file.If you wanted to change anything in the file you could use edit (filename).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top