Archived

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

Davaris

Modifying file creation dates

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
Do a search in MSDN for _find or _wfind. This is probably what you are looking for.

Jumpster

Semper Fi

Edited by - Jumpster on October 6, 2000 6:39:03 PM

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