473,396 Members | 1,599 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Accessing directory

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.

Jun 10 '07 #1
10 1401
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.
Jun 10 '07 #2
"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
Jun 10 '07 #3
"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
Jun 10 '07 #4
Umesh <fr****************@gmail.comwrites:
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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 10 '07 #5
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.orgwrote:
>Umesh <fr****************@gmail.comwrites:
>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.
Why should he waste his time?

Jun 10 '07 #6
>>>>"KMcC" == Kenny McCormack <ga*****@xmission.xmission.comwrites:

KMcCWhy 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
--
Charlton Wilbur
cw*****@chromatico.net
Jun 10 '07 #7
In article <87************@mithril.chromatico.net>,
Charlton Wilbur <cw*****@chromatico.netwrote:
>>>>>"KMcC" == Kenny McCormack <ga*****@xmission.xmission.comwrites:

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

Jun 10 '07 #8
Charlton Wilbur <cw*****@chromatico.netwrites:
>>>>>"KMcC" == Kenny McCormack <ga*****@xmission.xmission.comwrites:
[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.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Jun 10 '07 #9
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.orgwrote:
>Charlton Wilbur <cw*****@chromatico.netwrites:
>>>>>>"KMcC" == Kenny McCormack <ga*****@xmission.xmission.comwrites:
[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.
Like you do?

You're not exactly setting a good example.

Jun 10 '07 #10
(Kenny McCormack) wrote:
Keith Thompson <k...@mib.orgwrote:
Umesh <fraternitydispo...@gmail.comwrites:
>[usual Umesh rubbish snipped]
Please respond to this.

Why should he waste his time?
Based on Umesh's posting history, he obviously
has no qualms about wasting his time here.

Jun 10 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Swami | last post by:
I was wondering how I can programmatically find out the path of an installed program. I have an application that needs access to a config file that resides in the folder of another application. ...
3
by: diephouse | last post by:
I seem to be having a problem accessing networks shares. For example, I try the following code: File.Exists(@"\\SERVER\share"); always returns false! Or even if I map the drive ...
2
by: Mike M | last post by:
Hello, I created a simple C# library assembly that exposes general facilities I would like to use in my ASP.NET web applications. If I added the assembly into the bin directory of my asp.net...
2
by: Remco Bosman | last post by:
Dear Developers, I am building a little WebPart for the new sharepoint 2003 services. The webspart simply has to show a list of users and their phonenumbers, which come from our main domain....
0
by: Frustrated | last post by:
I was having several errors and decided to recreate the web site and web application directories and now I can no longer access it using IE or VS.NET. The Error in IE is: Server Error in...
4
by: First Tiger | last post by:
Is there a default function or global variable that will allow me to derive the location of my install? I'm trying to store my system settings file from a persistent location. I know that I can set...
5
by: samadams_2006 | last post by:
I'm having a problem in accessing a Microsoft Access Database in a VB.NET Web Application. It's so straight forward, I thought I'd walk you through all the details here: 1) I have a .NET Web...
2
by: contractsup | last post by:
Environment: $ uname -a AIX <withheld2 5 000100614C00 $ db2level DB21085I Instance "<withheld>" uses "32" bits and DB2 code release "SQL08024" with level identifier "03050106"....
1
by: Jerim79 | last post by:
Probably an incredibly simple answer, but I can't seem to phrase it so a search engine can understand it. I have a php script with a simple include: include("/include_this.php") I need to...
2
by: =?Utf-8?B?SklNLkgu?= | last post by:
Accessing AD in ASP.Net 1. It sees I can I access Active Directory catalog from asp.net, is the version of AD important for this? 2. Do I need to have a domain user for that or IIS will be...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.