473,320 Members | 1,884 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,320 software developers and data experts.

Linux Folder Iteration

Hi,

Sorry if this is OT but I'm not sure where else to post it.

How do you iterate through the files in a particular folder on linux in
C++?

Thanks,
Connell

Jan 9 '06 #1
3 2955
Connell wrote:
Hi,

Sorry if this is OT but I'm not sure where else to post it.

How do you iterate through the files in a particular folder on linux in
C++?

Thanks,
Connell


look for opendir, readdir in google or
man opendir

hth, Daniel

Jan 9 '06 #2
> Connell wrote:
Hi,

Sorry if this is OT but I'm not sure where else to post it.

How do you iterate through the files in a particular folder on linux in
C++?


[OFF-TOPIC]
[PEDANTIC]
Linux has "directories", not "folders".
[/PEDANTIC]
[/OFF-TOPIC]
Jan 9 '06 #3
Connell wrote:
Sorry if this is OT but I'm not sure where else to post it.
Well, as is, the question is clearly off-topic because it is
environment specific. There is, however, a fairly general answer:
How do you iterate through the files in a particular folder on linux in
C++?


The Boost file system library provides functionality like this. As
this library will likely become part of the second C++ library
technical report (TR2 for short), it has a fair chance to eventually
become part of the standard C++ library. Just get the library from
<http://www.boost.org/>.
--
<mailto:di***********@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.eai-systems.com> - Efficient Artificial Intelligence
Jan 10 '06 #4

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

Similar topics

4
by: Jhuola Hoptire | last post by:
Just installed J2RE 1.4.2 on a Linux server. I am very knew to the POSIX world. I couldn't dig-up much in the docs or via google about the following: 1 - Is there a standard way to make sure...
7
by: Kim Lots | last post by:
Hi Sorry to disturb you again but i really like to know what's the NTFS folder permissions on a "virtual directory" folder for a public webserver iis 5.x running ASP 3.0 with an Access DB on a...
2
by: Anushya | last post by:
Hi when i try to browse thru all the folders in outlook recursively starting from the root folder, i couldnot explore the USER FOLDERS which comes straight under root folder. Wot is the...
0
by: abottchow | last post by:
Hi all, I'm new to the group and am seeking your advice on my Linux programming problem. Two programs are involved. One is myProgram.cc, which reads user's input from keyboard and prints...
3
by: TyBreaker | last post by:
I have a vbscript which returns the folder size of any folder instantly by referring to Folder.Size. I don't need any iteration or recursion through the subfolders, adding together individual file...
1
by: Benny Ng | last post by:
Dear All, Now I just finished my winform application. And a part of that is to send email reminder to the users. It's working fine in the server that with SMTP service in Windows 2003. But now...
0
by: chongming | last post by:
Hi, i want to display all the filenames on browser. However i found that if there are many filenames in that folder, result will be it will display a long list of filenames on that browser. My...
5
by: John Ladasky | last post by:
Hi folks, Running Python 2.5 on both a Windows XP laptop, and an Ubuntu Linux 7.04 desktop. I've gotten tired of maintaining multiple copies of my personal modules that I use over and over. ...
12
by: tvnaidu | last post by:
Trying to mount windows folder on Linux machine, getting this error. I have a folder called "CheckIn" on windows, I made that folder as Network sharing. ON lInux, I tried to access that folder by...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

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.