Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
3.50/5 (4 votes)
See more:
How to create folders and sub folders in vc++? It should first check whether the current folder exists or not, if it exists, then the same folder may be used, else new folder has to be created? for instance: Images\\IpAddress\\image1.jpeg.
Please help me...
Sergey Alexandrovich Kryukov 26-May-11 1:34am    
"Folder" is rather a metaphor for UI and for the users, at the API level this is "Directory".

Check this link ->

Creating directory in vc++[^]
Share this answer
LaxmikantYadav 26-May-11 0:51am    
My +5 : Nice Link
ShilpiP 26-May-11 0:54am    
Thanks Laxmikant :)
Sergey Alexandrovich Kryukov 26-May-11 1:33am    
Agree, a 5.
ShilpiP 26-May-11 1:35am    
Thanks SAKryukov :)
Gokulnath007 26-May-11 5:40am    
How to check whether it is already exists or not, if it exists, leave it as such, if it doesnt exists,then it should be created
You can use CreateDirectory(szDirPath,NULL) to create a directory.
Share this answer
Gokulnath007 22-Oct-13 7:01am    
Thank u preethi...
Using Win32 API:
- to check if directory exists, then
- to create directory if needed.

This is the MSDN article with sample using both functions.
This is codeproject solution to help you.
Good luck,
Sergey Chepurin.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900