Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rookie wondering how to get the date a file was last modified

Status
Not open for further replies.

bob323

MIS
Jan 3, 2001
5
0
0
US
Anyone know how to get a variable that would hold the date that a file was last modified?
 
Hi,

There is no standard C function that does this, but your compiler almost certainly provides a function that does. If you're using a *nix variety, take a look at fstat or stat. These are Posix functions that are sometimes provided by Windows implementations as well.

Maybe somebody else knows of a Windows/DOS function that's commonly provided (if that's what you're interested in).

HTH,

Russ
bobbitts@hotmail.com
 
Hi,
Depending on your compiler you can find the date info in the struct passed to the "findfirst, findnext" fuctions.

MS 16bit compiler dos_findfirst() etc.
Borland 16bit findfirst() etc.
Win32 FindFirstFile() etc.

A search of the help for these functions will give you the struct that is passed to each.

Pappy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top