如何在vc ++中创建文件夹和子文件夹? [英] How to create folders and sub folders in vc++?
本文介绍了如何在vc ++中创建文件夹和子文件夹?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在vc ++中创建文件夹和子文件夹?它应首先检查当前文件夹是否存在,如果存在,则可以使用相同的文件夹,否则必须创建新文件夹?例如:Images\\IpAddress \\image1.jpeg。
请帮助我......
解决方案
检查这个link - >
在vc ++中创建目录 [ ^ ]
您可以使用CreateDirectory(szDirPath,NULL)创建目录。
使用Win32 API:
GetFileAttributes- 检查目录是否存在,然后
CreateDirectory- 如果需要创建目录。
这是MSDN 文章,包含两个函数的示例。
这是codeproject 解决方案来帮助你。
祝你好运,
谢尔盖Chepurin。
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...
解决方案
Check this link ->
Creating directory in vc++[^]
You can use CreateDirectory(szDirPath,NULL) to create a directory.
Using Win32 API:
GetFileAttributes- to check if directory exists, then
CreateDirectory- 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.
这篇关于如何在vc ++中创建文件夹和子文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文