Get all files list in a directory

Y

yaron

Hi all

I am trying to find how to open a directory and getting the list of
files which belong to it. In the past I did the same thing with
"opendir", but I used UNIX and in the windows platform I can not use
the same command.

I am looking for a solution for almost a week. Please, please, please
help.

Thanks
Yaron
 
K

Kevin Goodsell

yaron said:
Hi all

I am trying to find how to open a directory and getting the list of
files which belong to it. In the past I did the same thing with
"opendir", but I used UNIX and in the windows platform I can not use
the same command.

That's because it's not standard. There is no standard support for
dealing with directories.
I am looking for a solution for almost a week. Please, please, please
help.

Try a group that supports the OS you are targeting or the implementation
you are using. You could also check for availably libraries. The Boost
library has support for this, I think. You could also look for the
Available C++ Libraries FAQ which is posted here from time to time.

See:
http://www.slack.net/~shiva/welcome.txt

That link contains, among other things, a list of groups where you might
be able to find specific help.

-Kevin
 
Y

yaron

Kevin Goodsell said:
That's because it's not standard. There is no standard support for
dealing with directories.


Try a group that supports the OS you are targeting or the implementation
you are using. You could also check for availably libraries. The Boost
library has support for this, I think. You could also look for the
Available C++ Libraries FAQ which is posted here from time to time.

See:
http://www.slack.net/~shiva/welcome.txt

That link contains, among other things, a list of groups where you might
be able to find specific help.

-Kevin


Thanks my friend
 
A

Ashish

yaron said:
Hi all

I am trying to find how to open a directory and getting the list of
files which belong to it. In the past I did the same thing with
"opendir", but I used UNIX and in the windows platform I can not use
the same command.

I am looking for a solution for almost a week. Please, please, please
help.

Thanks
Yaron

Ask in a unix/linux newsgroup. They'll be able to help you
 
A

Avinash

Ashish said:
Ask in a unix/linux newsgroup. They'll be able to help you

try to use the following code

system ( " dir /b pDirName > temp.txt " );
do this in C, this will store all the names of the directory pDirName
in temp.txt and then read this file and store it in the list.
 

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

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top