访问目录 [英] Accessing directory

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

问题描述

如何将目录中的所有文本文件作为输入?我想打开目录中的所有文件并处理它们。


否则,我需要单独打开目录中的所有文件

这是一项繁琐的工作。请指导。谢谢。

解决方案

Umesh写道:


如何全部拿走作为输入的目录中的文本文件?我想打开目录中的所有文件并处理它们。


否则,我需要单独打开目录中的所有文件

这是一项繁琐的工作。请指导。谢谢。



你和Kenny有关吗?


-

Ian Collins。


" Umesh" < fr **************** @ gmail.comschrieb im Newsbeitrag

news:11 ************** ********@i38g2000prf.googlegr oups.com ...


如何将目录中的所有文本文件作为输入?我想打开一个目录中的所有文件并处理它们。



在UNIX系统中:


cat * | yourprog


然后处理stdin,从此开始你的主题在这里。


再见,Jojo


" Umesh制作"写道:


如何将目录中的所有文本文件作为输入?我想打开目录中的所有文件并处理它们。


否则,我需要单独打开目录中的所有文件

这是一项繁琐的工作。请指导。谢谢。



你必须使用操作系统设施才能做到这一点,因为C不会确认
甚至是否存在目录。所以找一个新的新闻组和

在那里发布你的问题。当你发帖时,我建议你问*一个*清楚

问题,而不是像上面那样问两个问题。 所有文本文件和打开所有

文件不代表同一件事。这就是我们所说的,用英语,

_ambiguous_,你应该熟悉的一个词。


这是一个可能有帮助的小组,但有许多其他候选人也是。

如果你扫描这个和类似的组,通过。谷歌团体,答案几乎肯定是给了b $ b,可能是几次。对于一些回答你问题的团体,甚至可能会有一个

的常见问题解答。


comp.os.msdos.programmer


How to take all the text files in a directory as input? I want to open
all the files in a directory and process them.

Otherwise, I need to open all the files in the directory individaully
which is a tedious job. Please guide. Thanks.

解决方案

Umesh wrote:

How to take all the text files in a directory as input? I want to open
all the files in a directory and process them.

Otherwise, I need to open all the files in the directory individaully
which is a tedious job. Please guide. Thanks.

Are you related to Kenny?

--
Ian Collins.


"Umesh" <fr****************@gmail.comschrieb im Newsbeitrag
news:11**********************@i38g2000prf.googlegr oups.com...

How to take all the text files in a directory as input? I want to open
all the files in a directory and process them.

In UNIX like systems:

cat * | yourprog

then process stdin, from then on you''re on topic here.

Bye, Jojo


"Umesh" wrote:

How to take all the text files in a directory as input? I want to open
all the files in a directory and process them.

Otherwise, I need to open all the files in the directory individaully
which is a tedious job. Please guide. Thanks.

You will have to use operating system facilities to do that, since C doesn''t
even acknowledge the existence of directories. So find a new news group and
post your question there. When you post, I suggest you ask *one* clear
question, not two as you do above. "all text files" and "open all the
files" do not mean the same thing. It is what we call, in English,
_ambiguous_, a word you should become familiar with.

Here is one group that might help, but there are many other candidates too.
If you scan this and similar groups, via. Google groups, the answer has
almost certainly been given, probably several times. There might even be a
FAQ for some of these groups that answer your question.

comp.os.msdos.programmer


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

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