Archived

This topic is now archived and is closed to further replies.

Modifying file creation dates

This topic is 6277 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, I’ve written a couple of compilers for an engine I’ve been working on and I want them to only compile files that have been altered since the last compile. I am using Visual Studio 97. Are there any file functions that allow you to modify the creation dates of files? This would be the quickest and easiest way to do what I want. I’ve had a look for this info but so far I haven’t found anything yet. Any help would be appreciated. Dave

Share this post


Link to post
Share on other sites
Here's the most accurate way to retrieve the date and time for a file. Do a search for a function called "getftime". You should find some instructions on how to use it. If you're new to C/C++, it may seem a little advanced.

Edited by - WhatEver on October 7, 2000 10:35:16 PM

Share this post


Link to post
Share on other sites
I suspect what you''re looking for is not a way to modify creation dates, but rather modification (or last-write) dates. The Win32 function SetFileTime may be used to set both types.

Share this post


Link to post
Share on other sites