http://www.codecomments.com/archive371-2006-2-825947.html

Author How to get a list of files in a directory??
aoie

2006-02-28, 7:59 am

What is the best way to get the contents of a file directory into a list?
Bruno van Dooren

2006-02-28, 7:59 am


> What is the best way to get the contents of a file directory into a list?

The easiest is if you can use the .NET framework. Then you can use the
DirectoryInfo class, which can directly give you an array of contents.

with win32 you can use the FindFirstFile/FindNextFile enumeration functions.

For MFC CFindFile is maybe a good solution.

--

Kind regards,
Bruno.
bruno_nos_pam_van_dooren@hotmail.com
Remove only "_nos_pam"

adebaene@club-internet.fr

2006-02-28, 7:59 am


aoie wrote:
> What is the best way to get the contents of a file directory into a list?

FindFirstFile("*.*")
FindNextFile
FindClose

and filter out "." and ".." entries which, most of the time, are of no
interest for you.

Arnaud
MVP - VC

adebaene@club-internet.fr

2006-02-28, 7:59 am


aoie wrote:
> What is the best way to get the contents of a file directory into a list?

FindFirstFile("*.*")
FindNextFile
FindClose

and filter out "." and ".." entries which, most of the time, are of no
interest for you.

Arnaud
MVP - VC

James Brown [MVP]

2006-02-28, 7:59 am


"aoie" <removethis4spam.rastacey@nl.rogers.com> wrote in message
news:du193k$6g6$1@emma.aioe.org...
> What is the best way to get the contents of a file directory into a list?
>
>

Take a look at the DlgDirList API

James

--
Microsoft MVP - Windows SDK
www.catch22.net
Free Win32 Source and Tutorials

David D

2006-02-28, 7:07 pm

aoie wrote:
> What is the best way to get the contents of a file directory into a list?
>
>

For a platform independence take a look at Boost and it's Filesystem Library:
http://www.boost.org/libs/filesystem/doc/index.htm

/David

Sponsored Links

转载于:https://www.cnblogs.com/cy163/archive/2006/09/17/506437.html

Visual C the best way to get the contents of a file directory into a list相关推荐

  1. 安装 | Window下Visual Studio VS2015 VS2017 各版本下载地址

    博主github:https://github.com/MichaelBeechan 博主CSDN:https://blog.csdn.net/u011344545 VS2015 社区版(个人免费): ...

  2. Visual Studio 2017中的编译器工具布局

    写在前面 在工作中,偶尔会用到VC编译器.目前,最新版的VS已发布到了2017.其中,微软对于VS的目录结构进行了调整. 该文翻译自微软官方博文 Compiler Tools Layout in Vi ...

  3. ASP.NET 4 和 Visual Studio 2010 Web 开发概述

    声明:本文是ASP.NET 白皮书 ASP.NET 4 and Visual Studio 2010 Web Development Overview 的阅读摘要,只是本人的学习记录,并非完整翻译,仅 ...

  4. visual studio 的各个版本下载地址

    Microsoft Visual Studio 6.0 下载: 英文版360云盘下载: http://l11.yunpan.cn/lk/sVeBLC3bhumrI 英文版115网盘下载: http:/ ...

  5. OpenCL(CUDA5.0) + Visual Studio 2010 环境配置

    1.安装步骤 1)安装CUDA5.0 本文默认的安装目录为:C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA \v5.0 CUDA SDK的默认安装 ...

  6. 为什么选择 Visual Studio Code

    为什么选择 Visual Studio Code 你在 VS Code 中找到的每个功能都完成一项出色的工作,构建了一些简单的功能集,包括语法高亮.智能补全.集成 git 和编辑器内置调试工具等,将使 ...

  7. 利用Visual Studio Project自动将数据加载到SQL Server数据库中

    介绍 (Introduction) A few months back, I encountered an interesting challenge at a client site. For th ...

  8. Visual Studio 6/2005/2008/2010/2012/2013 各版本编译器 下载

    // // 备注:本篇文章来自 vc驿站: http://www.cctry.com // C.C++.VC++ 各种学习资源,免费教程,期待您的加入! // Microsoft Visual Stu ...

  9. Using React, Typescript, and Webpack with Visual Studio 2015

    2019独角兽企业重金招聘Python工程师标准>>> I work with Microsoft technologies in my day job. I do a lot of ...

最新文章

  1. Spark SQL之jdbc方式访问
  2. 一个月学会Python,零基础入门数据分析
  3. HDU1048 The Hardest Problem Ever
  4. java script eval_「eval」js中的eval方法详解(一)–eval方法的初级应用 - seo实验室...
  5. C#读取数据库返回泛型集合(DataSetToList)
  6. 对于Linux安装mysql5.7版本出现的问题
  7. 八 关于电机驱动芯片L298N使用心得
  8. PCIe协议学习之-Ack/Nak协议
  9. 用html做祝福语朋友,朋友关怀祝福语(把祝福语化作露带给你)
  10. c语言课程设计作业,c语言课程设计心得体会
  11. Windwos磁盘管理工具diskpart
  12. Js 实现十六进制颜色值和RGB颜色值转换整理
  13. 使用Epub.js打开本地Epub文件
  14. CVPR读书笔记[7]:PCA的理解
  15. 动圈话筒,电容话筒,驻极体话筒的区别
  16. AI溃败,被Dota2职业战队打蠢!独家专访OpenAI:我们发现一个Bug
  17. jmeter压测部分参数优化
  18. MySQL存储布类型的值_mysql 字段存储类型
  19. 微信支付踩坑合集:微信小程序支付失败是什么原因?
  20. oracle+统计表的字段,统计系统中表的个数与查询所有表的字段信息-Oracle

热门文章

  1. 指令: JO、JNO、JB、JNB、JE、JNE、JBE、JA、JS、JNS、JP、JNP、JL
  2. 和机器人问问题的软件_ABB机器人系统与软件的问答
  3. 2022 需求工程选择填空题【太原理工大学】
  4. 数据库系统概念(机械工业出版社,第六版)复习——第八章:关系数据库设计
  5. 从零开始跑ORB_SLAM2(一) 前期准备与环境配置
  6. NUMECA FINE/TURBO euranus solver高性能集群pbs脚本
  7. sincerit 1173 采矿
  8. Linux教程 第十一课 Linux进程管理及作业控制(几本没看懂)
  9. 推荐几款好用的Linux电子书阅读器(上)
  10. 搜索切换dump之MapReduce讲解