File Properties?

This is a discussion on File Properties? within the C Programming forums, part of the General Programming Boards category; How can i obtain the creation date of any given file? I expect theres a library function somewhere. Simple to ...

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

    Question File Properties?

    How can i obtain the creation date of any given file? I expect theres a library function somewhere.

    Simple to say but cant find any reference to it in my books.

    Thanks for any help peeps

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    What OS / Compiler ?
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    The standard doesnt define functions to do this.

    If you want this info, then you need an API for your specific OS..

    If you are looking at windows, go to MSDN and look at GetFileAttributesEx()

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    30
    Hi,

    Probably it's not what you're looking for, but it could be useful.
    Under a GNU-compatible system, check out struct stat and the function stat. The struct contains many attributes, inlcuding but not limited to - last access and last mod. timestamps.

    Also, there is a great func in Borland C++ Builder 6. This is called FileGetAttr. The struct which holds the desired info is TSearchRec. You'll need Windows to use this.

    Hope this helps!

    Good luck!
    Best Regards,

    Bill

  5. #5
    Registered User
    Join Date
    Nov 2002
    Posts
    3

    OS / Compiler i'm using

    Thanks for the replys

    I'm using DOS versions 4.08, 5.09 & 5.10 and VC++ 1.52 compiler.

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    3

    Thumbs up job done

    Thanks all,

    ended up using the dos.h header,

    and functions _dos_findfirst , _dos_findnext

    if anyone else is interested

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. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 05:14 AM
  3. multiple file loading. so fruturated! help!
    By psychopath in forum Game Programming
    Replies: 5
    Last Post: 05-09-2005, 06:13 PM
  4. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 11:12 PM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM

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