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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

checking for directory

Status
Not open for further replies.

joeGrammar

Programmer
Jun 4, 2001
162
CA
Is there a way in C++ to check if a filename is a directory?
 
Try _stat(), _fstat() and the _stat structure. :) Hope that this helped! :)
 
you can use GetFileAttributes("file");
if return value is 10 (as I remember, maybe is other, check yourself) then is a directory. Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top