Thread: Printing list of .txt files saved in directory

  1. #1
    Unregistered
    Guest

    Exclamation Printing list of .txt files saved in directory

    i have been working with simple file i/o, and i want to be able to show the user a list of all the files they have created. i tried the
    system(dir *.txt), but it is a little sloppy. is there a way to print the filename only, and not all the other info?

  2. #2
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    It depends on what your OS is and what platform your progamming for.

  3. #3
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    check out findfirst/findnext to do it formally.
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help sorting a linked list. Beginner
    By scarlet00014 in forum C Programming
    Replies: 1
    Last Post: 09-27-2008, 06:16 PM
  2. Adding directory/file names to a linked list
    By thoseion in forum C Programming
    Replies: 13
    Last Post: 12-08-2006, 01:13 PM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. List class
    By SilasP in forum C++ Programming
    Replies: 0
    Last Post: 02-10-2002, 05:20 PM