Thread: C/C++ function for listing folders and file

  1. #1
    Information Crocodile
    Join Date
    Dec 2004
    Posts
    204

    C/C++ function for listing folders and file

    Im trying to make a windows program which list folders and files in a directory, is there a c or c++ for this?

  2. #2
    Registered User
    Join Date
    Oct 2004
    Posts
    13
    In stdlib.h there is a function system(); - it takes command like parameters.

    system("dir") should suffice.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Try learning to read the FAQ first
    http://faq.cprogramming.com/cgi-bin/...&id=1044780608
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM
  2. internet
    By yeah in forum C Programming
    Replies: 16
    Last Post: 02-12-2005, 10:37 PM
  3. [code] Recursive Search Function
    By anonytmouse in forum Windows Programming
    Replies: 1
    Last Post: 12-17-2004, 11:21 PM
  4. Looking for a file in the HardDisk
    By BianConiglio in forum C Programming
    Replies: 11
    Last Post: 03-15-2004, 12:52 PM
  5. File reading in folders
    By CSoFun in forum C++ Programming
    Replies: 4
    Last Post: 03-11-2003, 07:35 PM