reading files from a folder

This is a discussion on reading files from a folder within the C Programming forums, part of the General Programming Boards category; i need a simple code(i'm a beginner) to read all the files in a folder for a windows platform using ...

  1. #1
    Registered User
    Join Date
    May 2011
    Posts
    1

    reading files from a folder

    i need a simple code(i'm a beginner) to read all the files in a folder for a windows platform using c

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    First... the C standard does not include directory search functions, because they are specific to operating systems and file systems. But you should check your compiler's documentation for extension functions. (And don't listen to the palaver about "standards" and "portability" this will draw as there's nothing portable about any of this.)

    The "Windows way" of searching directories uses two functions... FindFirstFile() and FindNextFile() ... it's a bit complex for a beginner but there are plenty of examples floating around...

    If you get stuck, post your code and I'll try to give you a hand....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 09:52 PM
  2. Accessing .dat files within a folder
    By porsche911nfs in forum C++ Programming
    Replies: 4
    Last Post: 04-02-2009, 10:26 PM
  3. reading folder names..how is it done ?
    By roalme00 in forum C++ Programming
    Replies: 8
    Last Post: 01-11-2008, 09:34 AM
  4. get files in a folder and more
    By appleGuy in forum Windows Programming
    Replies: 3
    Last Post: 09-05-2006, 08:59 AM
  5. Finding files in a folder
    By ryeguy in forum C++ Programming
    Replies: 2
    Last Post: 10-07-2005, 01:00 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21