473,654 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

os.stat access and modify time same on WinXP

rbt
I'm using the standard NTFS file system. The only time the access time
is updated is when the file is modified or saved (with no changes).
What's up with that? Shouldn't a read/view update the access time?
Jul 18 '05 #1
2 1714
rbt wrote:
I'm using the standard NTFS file system. The only time the access time
is updated is when the file is modified or saved (with no changes).
What's up with that? Shouldn't a read/view update the access time?


See
http://www.microsoft.com/resources/d...c_fil_punq.asp

Quoting:
'''
The Last Access Time on disk is not always current because NTFS looks
for a one-hour interval before forcing the Last Access Time updates to
disk. NTFS also delays writing the Last Access Time to disk when users
or programs perform read-only operations on a file or folder, such as
listing the folder's contents or reading (but not changing) a file in
the folder. If the Last Access Time is kept current on disk for read
operations, all read operations become write operations, which impacts
NTFS performance.

Note

* File-based queries of Last Access Time are accurate even if all
on-disk values are not current. NTFS returns the correct value on
queries because the accurate value is stored in memory.
'''

Does that help?

(Just went through this myself the other day.)
-Peter
Jul 18 '05 #2
rbt
Peter Hansen wrote:
rbt wrote:
I'm using the standard NTFS file system. The only time the access time
is updated is when the file is modified or saved (with no changes).
What's up with that? Shouldn't a read/view update the access time?

See
http://www.microsoft.com/resources/d...c_fil_punq.asp
Quoting:
'''
The Last Access Time on disk is not always current because NTFS looks
for a one-hour interval before forcing the Last Access Time updates to
disk. NTFS also delays writing the Last Access Time to disk when users
or programs perform read-only operations on a file or folder, such as
listing the folder's contents or reading (but not changing) a file in
the folder. If the Last Access Time is kept current on disk for read
operations, all read operations become write operations, which impacts
NTFS performance.

Note

* File-based queries of Last Access Time are accurate even if all
on-disk values are not current. NTFS returns the correct value on
queries because the accurate value is stored in memory.
'''

Does that help?

(Just went through this myself the other day.)
-Peter


Yes, it does. Thank you.
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3037
by: Ken Tucker | last post by:
Help! I'm recursing through 10,000 directories where some have as few as 5 files and others have 100's. I'm then performing a few things based on the modify date of the file. Needless to say, this script is going to run a long time regardless of what I do. But if I remove the stat, the script runs 500% faster (duh). That being said, I've set out to find something faster than stat if at all possible (since stat gets much more info than I...
0
2005
by: Neil Sargent | last post by:
This is a general posting of how I fixed a problem created by using the Access 97 ODE Setup Wizard on a Windows XP machine. I hope it helps anyone who comes across the problem saves them the 3 days its taken me to sort out. The application generates the following error: "Incompatible version of the RPC stub" This occurs when trying to run Outlook to send an email. However I expect it would occur for any operation which uses...
10
5267
by: David Farning | last post by:
I am new to c and not yet sure of the boundary between c and it's implementations. So please redirect me if this should be asked elsewhere. I am working on a function to determine if a directory exists. The idea comes from a snippet I found in a samba source file. bool dirExist(char *dname) { struct stat *stbuf; //stbuf = (struct stat*)malloc(sizeof(struct stat));
3
3942
by: David Bear | last post by:
I'm trying to use os.chmod and am refered to the stat module. Is there are explanation of: * S_ISUID * S_ISGID * S_ENFMT * S_ISVTX * S_IREAD * S_IWRITE * S_IEXEC
2
3542
by: cedarson | last post by:
I am writing a program and have been instructeed to use the 'fseek', 'ftell', and 'stat' functions, however, after looking in the online manual for each of these, I am still unsure on how to use them. In my program, I am to write a code that opens a file, uses 'stat' to determine the file size, use 'fseek' to move the offset of the pointer, and finally use 'ftell' to obtain the file pointer index. Will someone please help? Again, thanks...
21
2413
by: Bigpond News | last post by:
Work at a large site - 1000+ PC's. Mixture of Win98 & WinXP. Majority of applications using Access 97. If I compile the Acc97 application on a Win98 PC, the .mde will run perfectly on both Win98 and WinXP PC's. However, if I compile on a WinXP PC, the application doesn't run correctly on Win98 PC's. While I guess a Windows issue, does anyone know the offending files and even better, how to resolve it ? Otherwise I need to...
2
5041
by: Michael Glassford | last post by:
The Python 2.5 News at http://www.python.org/download/releases/2.5/NEWS.txt states that Python 2.5 was changed to "Use Win32 API to implement os.stat/fstat. As a result, subsecond timestamps are reported, the limit on path name lengths is removed, and stat reports WindowsError now (instead of OSError)." Although not mentioned in the Python 2.5 News, apparently there was a similar change on Mac that I'm having some problems with. On the...
6
1352
by: one2001boy | last post by:
Hello, I tried to find the access time of a file using stat() function. but the following C code in windows vc.net 2003 always give the same access time. the same code works correctly in linux gcc. do I miss something? #include <stdio.h> #include <sys/stat.h> int main() {
24
6097
by: Joe Salmeri | last post by:
I just upgraded from Python 2.4.2 to Python 2.5.1 and have found some unexpected behavior that appears to be a bug in the os.stat module. My OS is Windows XP SP2 + all updates. I have several programs that have worked flawlessly on all previous Python versions for years and they are now producing incorrect results in the code that uses os.stat. Searching through the 2.5.1 release notes I found the following:
0
8376
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8489
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1596
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.