Folder not updating the Date Modified

G

Guest

I have an application that looks at a particular folder on my XP Pro system.
The application will look to see if a file was written to this folder. If a
file has not been created in a 24 hour period, I will get a prompt telling me
so. This folder gets numerous files wriiten to it on a daily basis. I
confirmed this by creating a file manually in the directory. After I created
the file I check the properties of the folder and the Date Modified still
says March 3 2006. It is June 6 2007 today.
Does anyone know why this is not getting updated and how this is fixed?
 
M

Mark F.

Trevor said:
I have an application that looks at a particular folder on my XP Pro
system.
The application will look to see if a file was written to this folder. If
a
file has not been created in a 24 hour period, I will get a prompt telling
me
so. This folder gets numerous files wriiten to it on a daily basis. I
confirmed this by creating a file manually in the directory. After I
created
the file I check the properties of the folder and the Date Modified still
says March 3 2006. It is June 6 2007 today.

Does anyone know why this is not getting updated and how this is fixed?

Did you create the file from scratch or simply copy/move it? In order for
the file's the LastWriteTime (Date Modified) attribute to be changed the
file must be opened, altered, and saved to disk. The exception to this are
programs that "touch" or change the file's datestamp to a new date and time.

The three file time and date stamps are:
CreationTime first written to disk
LastAccessTime opened in any file access mode
LastWriteTime data written to disk

Another method of checking files is to open the file in "binary read" and
read the length in bytes. If the file is altered in anyway the file length
will change.

Mark
 
G

Guest

I have tried everything. Creating a brand new file, copying one in and
updating it...
Nothing seems to work.

I am not sure what you mean by "open the file in binary read"?

Evrything I have tried does not seem to work. Any other suggestions.
 
M

Mark F.

Trevor said:
I have tried everything. Creating a brand new file, copying one in and
updating it...
Nothing seems to work.

I am not sure what you mean by "open the file in binary read"?

Evrything I have tried does not seem to work. Any other suggestions.

:

You said: I am not sure what you mean by "open the file in binary read"?

I was referring to reading the file length of a file opened as binary rather
than text. The carriage return / line feed characters are handled
differently and therefore return different results in the file length. A
known programming issue.

Also, if the date is incorrect when a new file is created I would check the
system clock for accuracy. It may also have a different date from a server
if that clock is off.

If I knew more about the application, the file, and the process, I might
have a solution.

Mark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top