处理文件而不知道他们的名字 [英] Handling files without knowing their names

查看:77
本文介绍了处理文件而不知道他们的名字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。我想知道是否有办法处理多个文件,即使我只知道它们所在的目录。我应该以相同的方式对每一个进行操作,但由于它们超过30,我应该在不知道其名字的情况下打开它们。

解决方案

你可以使用API​​迭代目录中的文件:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418%28v=vs.85%29.aspx [ ^ ],

http:// msdn.microsoft.com/en-us/library/windows/desktop/aa364428%28v=vs.85%29.aspx [ ^ ]。



这是您所需要的一切。

-SA

Hi guys. I'd like to know if there's a way to handle several files even if I know only the directory where they are located. I should operate on them in the same way for each one, but since they are more than 30, I should need to open them without knowing their names.

解决方案

You can iterate through the files in a directory using the API:
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364418%28v=vs.85%29.aspx[^],
http://msdn.microsoft.com/en-us/library/windows/desktop/aa364428%28v=vs.85%29.aspx[^].

This is a all you need.
—SA


这篇关于处理文件而不知道他们的名字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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