Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Get all files list in a directory

Reply
Thread Tools

Get all files list in a directory

 
 
yaron
Guest
Posts: n/a
 
      10-04-2003
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
 
Reply With Quote
 
 
 
 
Mike Wahler
Guest
Posts: n/a
 
      10-04-2003

"yaron" <> wrote in message
news: m...
> 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.


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

-Mike


>
> Thanks
> Yaron



 
Reply With Quote
 
 
 
 
Kevin Goodsell
Guest
Posts: n/a
 
      10-04-2003
yaron wrote:

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

 
Reply With Quote
 
WW
Guest
Posts: n/a
 
      10-04-2003
yaron wrote:
> 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.


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

--
WW aka Attila


 
Reply With Quote
 
yaron
Guest
Posts: n/a
 
      10-05-2003
Kevin Goodsell <> wrote in message news:<2cGfb.2068$ ink.net>...
> yaron wrote:
>
> > 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



Thanks my friend
 
Reply With Quote
 
yaron
Guest
Posts: n/a
 
      10-05-2003
"WW" <> wrote in message news:<blnb3d$hsl$>...
> yaron wrote:
> > 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.

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


Thanks, my friend
 
Reply With Quote
 
Ashish
Guest
Posts: n/a
 
      10-06-2003

"yaron" <> wrote in message
news: m...
> 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


 
Reply With Quote
 
Avinash
Guest
Posts: n/a
 
      10-07-2003
"Ashish" <> wrote in message news:<blsoe4$fltq8$>...
> "yaron" <> wrote in message
> news: m...
> > 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


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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to only get a list of the names of the non-directory files incurrent directory ('.')? iMath Python 8 11-13-2012 09:24 PM
.Net Tips, C# Tips : Get list of all files of directory or folderusing LINQ using .Net Framework 4 with C# Examples and VB.Net Examples jayeshsorathia@gmail.com ASP .Net 0 07-27-2012 07:13 AM
show all files in the directory, but how to show directory control?? strutsng@gmail.com HTML 1 09-30-2005 07:32 AM
list all css files in a directory and sub directory TJS ASP .Net 1 06-23-2004 10:49 AM
Great Topic! Do You Want to List All the Files of a Directory? Get the BOOST FileSytem Now! It Works With Your C++ Compiler and It Is FREE! perseus C++ 2 08-13-2003 06:34 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57