DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: obtain a list of files in the current folder?

  1. #1
    Joe Nicholas Guest

    obtain a list of files in the current folder?


    For example if you wanted to compile a list of all the files in a specified
    directory, how might one do this?

    thx,
    joe

  2. #2
    Neil A. Van Note Guest

    Re: obtain a list of files in the current folder?


    "Joe Nicholas" <josephn@micron.netREMOVETHIS> wrote:
    >
    >For example if you wanted to compile a list of all the files in a specified
    >directory, how might one do this?
    >
    >thx,
    >joe


    In the windows env., Something like the following...

    WIN32_FIND_DATA fd;
    HANDLE hFind = ::FindFirstFile(lpFileSpec, &fd);

    if (INVALID_HANDLE_VALUE != hFind) {
    do {
    // TODO: Process the found entry.
    } while (0 != ::FindNextFile(hFind, &fd));
    ::FindClose(hFind);
    }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center