Accessing directory

U

Umesh

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.
 
I

Ian Collins

Umesh said:
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?
 
J

Joachim Schmitz

Umesh said:
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
 
O

osmium

Umesh said:
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
 
K

Keith Thompson

Umesh said:
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, why would anyone want to help you after the way you've behaved
in this newsgroup? People have answered many of your questions; you
have never acknowledged that help or given any sign that you've
followed, or even understood anyone's advice. Why should we waste our
time?

Please respond to this.
 
K

Kenny McCormack

Umesh, why would anyone want to help you after the way you've behaved
in this newsgroup? People have answered many of your questions; you
have never acknowledged that help or given any sign that you've
followed, or even understood anyone's advice. Why should we waste our
time?

Please respond to this.

Why should he waste his time?
 
C

Charlton Wilbur

KMcC> Why should he waste his time?

Because if he does, and he shows that he appreciates the help and is
learning from it, he may get more.

Charlton
 
K

Kenny McCormack

KMcC> Why should he waste his time?

Because if he does, and he shows that he appreciates the help and is
learning from it, he may get more.

Just in case you haven't figured it out yet, there is no help to be gotten
from this newsgroup - only abuse.

Not that there is anything wrong with that...
 
K

Keith Thompson

Charlton Wilbur said:
[snip]

Because if he does, and he shows that he appreciates the help and is
learning from it, he may get more.

KMcC is a troll. Please ignore him.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top