Connecting Tech Pros Worldwide Help | Site Map

Get all files list in a directory

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 19th, 2005, 06:46 PM
yaron
Guest
 
Posts: n/a
Default Get all files list in a directory

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

  #2  
Old July 19th, 2005, 06:46 PM
Mike Wahler
Guest
 
Posts: n/a
Default 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]


  #3  
Old July 19th, 2005, 06:46 PM
Kevin Goodsell
Guest
 
Posts: n/a
Default 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.

  #4  
Old July 19th, 2005, 06:46 PM
WW
Guest
 
Posts: n/a
Default 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


  #5  
Old July 19th, 2005, 06:47 PM
yaron
Guest
 
Posts: n/a
Default 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
  #6  
Old July 19th, 2005, 06:47 PM
yaron
Guest
 
Posts: n/a
Default 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
  #7  
Old July 19th, 2005, 06:56 PM
Ashish
Guest
 
Posts: n/a
Default 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


  #8  
Old July 19th, 2005, 06:57 PM
Avinash
Guest
 
Posts: n/a
Default 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.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.