how to view files in a directory

This is a discussion on how to view files in a directory within the C++ Programming forums, part of the General Programming Boards category; I am currently trying to write a program that when executed show the files and subdirectories housed within a certain ...

  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    1

    how to view files in a directory

    I am currently trying to write a program that when executed show the files and subdirectories housed within a certain file folder (ie. C:\Program Files\AIM) I was wondering what the best avenue was for this? My current version uses the .NET framework but I am having some issues with that. So I was thinking that there may be some code in C++ that would aid me in this. Thanks

    Rob

  2. #2
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    FindFirstFile() and FindNextFile() should do the job, I know MSDN has an example on it.

  3. #3
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,806
    WooooooooooooooooooooooooooooooooooooooHoooooooooo oooooooooooooooooooooo
    http://faq.cprogramming.com/cgi-bin/...&id=1044780608
    Woop?

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. view network directory code
    By not_someguy in forum C++ Programming
    Replies: 2
    Last Post: 06-25-2008, 01:54 PM
  3. Couple errors please help :-D
    By JJJIrish05 in forum C Programming
    Replies: 9
    Last Post: 03-06-2008, 01:54 AM
  4. Listing files in a directory.
    By Devil Panther in forum C++ Programming
    Replies: 5
    Last Post: 11-04-2006, 08:39 PM
  5. Dos commands hehe
    By Carp in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 01-17-2003, 01:51 PM

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