How to display files in hdd

This is a discussion on How to display files in hdd within the C Programming forums, part of the General Programming Boards category; Hi.. Is it possible for me to display all files in my hdd using C? If so, what library or ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    3

    How to display files in hdd

    Hi..

    Is it possible for me to display all files in my hdd using C?

    If so, what library or function that should I use to display the volume partition?

  2. #2
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Which operating system?

    Because disk structures vary from OS to OS, usually you will be calling an OS based function to get directory information.

    In Windows you're looking for FindFirst(), FindNext(), and FindClose().

    I have no idea what you might need on MAC or Linux....

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    3
    I am using Windows..

  4. #4
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Ok head on over and check this link....

    FindFirstFile Function (Windows)

    MSDN is the full documentation of the Windows API, tons of fun stuff...

    Of course there are also C add-on libraries for the purpose. Pelles C, my choice, comes with a particularly good file and directory library.

  5. #5
    Registered User
    Join Date
    Oct 2010
    Posts
    3
    Thanks for the suggestion.. I never know about Pelles C before..
    Gonna test it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. HELP!!!!emergency Problem~expert please help
    By unknowppl in forum C++ Programming
    Replies: 9
    Last Post: 08-21-2008, 07:41 PM
  2. Program Deployment and DLL/OCX Files?
    By dfghjk in forum C++ Programming
    Replies: 5
    Last Post: 06-16-2008, 03:47 AM
  3. endless loop for scanf - plz help
    By owi_just in forum C Programming
    Replies: 18
    Last Post: 03-20-2005, 01:41 PM
  4. Need a Code to display .jpg files
    By arvindkr in forum C++ Programming
    Replies: 4
    Last Post: 08-31-2002, 06:43 PM
  5. reinserting htm files into chm help files
    By verb in forum Windows Programming
    Replies: 0
    Last Post: 02-15-2002, 09:35 AM

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