Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to Check if Folder Exists?



How to Check if Folder Exists?..

Answer / Ankita Kumari

To check if a folder exists in Win32API code, you can use the CreateFile function with the FILE_ATTRIBUTE_DIRECTORY flag and a file path. If it returns INVALID_HANDLE_VALUE, then the folder does not exist.n`nBOOL FolderExists(LPCTSTR path) {nHANDLE h = CreateFile(path, 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_DIRECTORY, NULL);nreturn (h != INVALID_HANDLE_VALUE);n}n`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Win32API Code Interview Questions

What is the functionality of EnumChildWindows?

1 Answers  


Plrase send project in vb.net on hotel management.

0 Answers  


What is the functionality of GetWindow?

1 Answers  


What is the functionality of EnumWindows?

1 Answers  


What is the functionality of GetWindowTextLength?

1 Answers  


How to Get File Extension?

1 Answers  


How to get Filename from Path?

1 Answers  


What is the functionality of SendMessage?

1 Answers  


What is GUID anyway?

1 Answers  


What is the functionality of GetDesktopWindow?

1 Answers  


What is the functionality of GetWindowText?

1 Answers  


How to Check if Folder Exists?

1 Answers  


Categories