Obscure File question

This is a discussion on Obscure File question within the C++ Programming forums, part of the General Programming Boards category; Is there a way to read in the Created date of a file? Kubie (I'm a Newbee - so speak ...

  1. #1
    Registered User
    Join Date
    Aug 2002
    Posts
    3

    Question Obscure File question

    Is there a way to read in the Created date of a file?

    Kubie


    (I'm a Newbee - so speak slow, and use pictures)

  2. #2
    Registered User
    Join Date
    Aug 2002
    Posts
    3
    i'm using NT4 and w2k... with Visual C++ 6.0

  3. #3
    kuphryn
    Guest
    Using Win32 API GetFileDate().

    Read this article from MSDN.

    http://msdn.microsoft.com/library/de...tableFiles.asp

    Kuphryn

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >i'm using NT4 and w2k... with Visual C++ 6.0
    This is one option:
    Code:
    #include <io.h>
    #include <ctime>
    #include <iostream>
    
    int main()
    {
      _finddata_t file;
      if ( _findfirst ( "somefile", &file ) != -1 )
        std::cout<<"The file was created on "<< ctime ( &file.time_create );
      return 0;
    }
    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A development process
    By Noir in forum C Programming
    Replies: 37
    Last Post: 07-10-2011, 11:39 PM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 05:54 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  4. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  5. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM

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