• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

How to make sure if a path string is existence or not?

  When I got a input path sring, how can I make sure if it is existence or not ?
  Is there a MFC member function ?
  How can I do it?
  Looking forward your suggestion.
1 Solution
Here's a way to do it using MFC:

BOOL FileExists (LPCTSTR Filename) {
   CFileStatus Status;
   return (CFile::GetStatus (Filename, Status));
henry3Author Commented:
   Thanks for your advice.
   But CFile::GetStatus function can not distinguish folders between files. As I said , in fact I wanna consider a file as a inexisting path (or folders) .
Because I want to send some files to the folder, sending a file to file will turn to a ERROR.
   May be I don't express my Qestion exactly. But
How can I get the above purpose?
   After all, your answer is helpful.

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now