Connecting Tech Pros Worldwide Help | Site Map

Get all files list in a directory

yaron
Guest
 
Posts: n/a
#1: Jul 19 '05
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
Mike Wahler
Guest
 
Posts: n/a
#2: Jul 19 '05

re: Get all files list in a directory



"yaron" <c_yaron@hotmail.com> wrote in message
news:6404b44.0310041226.205d5a4d@posting.google.co m...[color=blue]
> 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.[/color]

http://tinyurl.com/pq8f#q4.3
http://www.parashift.com/c++-faq-lit...es.html#faq-39.
5

-Mike

[color=blue]
>
> Thanks
> Yaron[/color]


Kevin Goodsell
Guest
 
Posts: n/a
#3: Jul 19 '05

re: Get all files list in a directory


yaron wrote:
[color=blue]
> 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.[/color]

That's because it's not standard. There is no standard support for
dealing with directories.
[color=blue]
>
> I am looking for a solution for almost a week. Please, please, please
> help.[/color]

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
--
My email address is valid, but changes periodically.
To contact me please use the address from a recent posting.

WW
Guest
 
Posts: n/a
#4: Jul 19 '05

re: Get all files list in a directory


yaron wrote:[color=blue]
> 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.[/color]

http://www.boost.org/libs/filesystem/doc/index.htm

--
WW aka Attila


yaron
Guest
 
Posts: n/a
#5: Jul 19 '05

re: Get all files list in a directory


Kevin Goodsell <usenet1.spamfree.fusion@neverbox.com> wrote in message news:<2cGfb.2068$gA1.427@newsread3.news.pas.earthl ink.net>...[color=blue]
> yaron wrote:
>[color=green]
> > 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.[/color]
>
> That's because it's not standard. There is no standard support for
> dealing with directories.
>[color=green]
> >
> > I am looking for a solution for almost a week. Please, please, please
> > help.[/color]
>
> 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[/color]


Thanks my friend
yaron
Guest
 
Posts: n/a
#6: Jul 19 '05

re: Get all files list in a directory


"WW" <wolof@freemail.hu> wrote in message news:<blnb3d$hsl$1@phys-news1.kolumbus.fi>...[color=blue]
> yaron wrote:[color=green]
> > 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.[/color]
>
> http://www.boost.org/libs/filesystem/doc/index.htm[/color]

Thanks, my friend
Ashish
Guest
 
Posts: n/a
#7: Jul 19 '05

re: Get all files list in a directory



"yaron" <c_yaron@hotmail.com> wrote in message
news:6404b44.0310041226.205d5a4d@posting.google.co m...[color=blue]
> 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[/color]

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


Avinash
Guest
 
Posts: n/a
#8: Jul 19 '05

re: Get all files list in a directory


"Ashish" <ashoooo@hotmail.com> wrote in message news:<blsoe4$fltq8$1@ID-75446.news.uni-berlin.de>...[color=blue]
> "yaron" <c_yaron@hotmail.com> wrote in message
> news:6404b44.0310041226.205d5a4d@posting.google.co m...[color=green]
> > 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[/color]
>
> Ask in a unix/linux newsgroup. They'll be able to help you[/color]

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.
Closed Thread