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. AI助力清华博士进入周杰伦战队,预告AI应用迎来黄金时代?
  2. Linux Shell脚本攻略:shell中各种括号()、(())、[]、[[]]、{}的作用
  3. 基于Apache Thrift的公路涵洞数据交互实现原理
  4. Django从理论到实战(part36)--QuerySet转换SQL
  5. vscode 设置缩进为4_VS Code 设置缩进为4个空格
  6. linux bash 历史记录,Linux Bash History 命令历史记录
  7. 又跌了!2020年6月程序员工资统计
  8. linux 内核字符驱动char_dev源码分析
  9. 如何优化网站服务器来提高吞吐量并减少延迟时间
  10. webstorm简单介绍,webstrom基本使用
  11. UVALive3713_Astronauts
  12. 软件集成策略故事连载----构建错误是怎么来的
  13. 一次排查服务器端接口报500错误的经历
  14. Tapestry 5 资料
  15. win10 html字体设置,IT之家学院:如何解决Win10屏幕字体缩放模糊问题
  16. 教你自定义收支类别,收支账户进行记账
  17. s5p4418的uboot网络无法使用问题解决
  18. Pytorch 损失函数 Mean Squared Error
  19. mysql分组取最新一条数据
  20. Ubuntu中Python无法显示图片

热门文章

  1. Linux下c++串口编程
  2. 【Android工具】安卓TV云存储观影工具测试正常,安卓电视看电影方案小结
  3. 一键批量查询快递单号
  4. Windows更换系统字体、Typora主题等外观配置
  5. BITWIG综合音色库-Bitwig Studio 3.1.2 Sound Content x64 | 11G
  6. 南航计算机学院的实验室,OPEN DAY | 计算机科学与技术学院实验室开放日
  7. STM32读写24C02遇到的问题
  8. js学习20-(svg)
  9. 造福全球眼疾患者的技术 出现可辨识眼疾的AI系统
  10. Dreammail注册与登录