2 things about files

This is a discussion on 2 things about files within the C Programming forums, part of the General Programming Boards category; Hi, I'm doing some project, but I'm not very good in C, please help me, theres 2 things left for ...

  1. #1
    NVM
    NVM is offline
    Registered User
    Join Date
    Jan 2007
    Posts
    4

    2 things about files

    Hi,
    I'm doing some project, but I'm not very good in C, please help me, theres 2 things left for me:


    1. make list of files from folder, and place that list to text file.



    2. copy file from folder to other folder.



    thanx

  2. #2
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    Have you tried anything? We can fix that instead!

  3. #3
    NVM
    NVM is offline
    Registered User
    Join Date
    Jan 2007
    Posts
    4
    I've tried to make a list but there was an error on "#include <dirent.h>"

  4. #4
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,682
    What was the error did you get. Be more specfic on error messages which help us a lot on reply you. Was that the linking error, what compiler are u using and on what platform u are working on.

    ssharish2005

  5. #5
    NVM
    NVM is offline
    Registered User
    Join Date
    Jan 2007
    Posts
    4
    the error was "Cannot open include file: 'dirent.h'"

    i'm working with MS visual studio 6.0

  6. #6
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    http://faq.cprogramming.com/cgi-bin/...&id=1044780608

    Choose one which your platform supports.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  7. #7
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,682
    Code:
    the error was "Cannot open include file: 'dirent.h'"
    Well looking at the error message, it seems that the direct.h header file is not located in the include director. Find out the actual location of the that header file and specify the path as approriate. The FAQ would give give more infomation about programming on windows platform.

    ssharish2005

  8. #8
    NVM
    NVM is offline
    Registered User
    Join Date
    Jan 2007
    Posts
    4
    ok, thanx. sorry for my stupid questions

  9. #9
    ... kermit's Avatar
    Join Date
    Jan 2003
    Posts
    1,528
    If your machine is not POSIX compliant, or at least mostly compliant, you are not likely to have dirent.h. You would find it under Linux or FreeBSD.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Create Copies of Files
    By Kanshu in forum C++ Programming
    Replies: 13
    Last Post: 05-09-2009, 08:53 AM
  2. Reading .dat files from a folder in current directory...
    By porsche911nfs in forum C++ Programming
    Replies: 7
    Last Post: 04-04-2009, 10:52 PM
  3. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 07:55 AM
  4. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 09:36 AM
  5. header and source files
    By gtriarhos in forum C Programming
    Replies: 3
    Last Post: 10-02-2005, 04:16 AM

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