扫描目录以创建目录结构 [英] Scan Directory to create a directory Structure

查看:56
本文介绍了扫描目录以创建目录结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我想扫描目录以检查其中的每个文件/文件夹,获取带有扩展名,大小的名称,并检查其是文件还是文件夹.有没有可用的WINDOWS类来执行这些操作,或者有人可以建议我使用它的代码吗?
预先感谢您.....

Hello,
I want to scan a Directory for checking each file/folder in it, getting its name with extension, size, check whether its a file or folder. Is there any WINDOWS class available to do these operation or Can anybody suggest me the code for it?
Thanking u in advance.....

推荐答案

您可能会使用,递归到目录中,该技术在此MSDN示例中显示: [
You may use, recursing into directories, the technique show in this MSDN example: "Listing the Files in a Directory"[^].


您好,
如果使用MFC,则可以受益于
CFileFind [ ^ ]类.
否则,您可以使用以下功能 FindFirstFile(...) [ ^ ], FindNextFile(...) [ ^ ], FindFirstFileEx(...) [FindClose(...) [
Hi,
If you use MFC, you can benefit from CFileFind[^] class.
Otherwise, you can use these functions FindFirstFile(...)[^], FindNextFile(...)[^], FindFirstFileEx(...)[^] and FindClose(...)[^]


这篇关于扫描目录以创建目录结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆