File Last Accessed Worthless

G

Guest

just to clear things up right off the bat, I'm a software developer, so I'm
Windows savvy enough that you don't need to give me crap.

I'm working on a program that activly scans your desktop for unused items,
and I realized that the File Last Accessed always shows up as the exact date
and time you call it. Then I tried just viewing it under properties, and it
was giving me the exact time to the second that I right-clicked on the
shortcut. It seems to me that it's a waste of memory to save something that's
just calling a Time.

I'm using VB.Net and their File classes. I haven't run the .open sequence at
all, just gave it a filepath and called the last accessed date. If I can't do
that I don't see any way in which I can grab it without attempting to peek at
the memory, which I really do not want to do. If you can give me any help on
this I will be greatly appriciative.

-Gandalf2349
 
M

Mikhail Zhilin

I don't think it is the proper newsgroup for THIS question.

--
Mikhail Zhilin
MS MVP (Windows - Shell/User)
http://www.aha.ru/~mwz
Sorry, no technical support by e-mail.
Please reply to the newsgroups only.
======
 
R

Richard Urban [MVP]

(-:

Come to these newsgroups with a chip on your shoulder, asking a question
that has nothing to do with Windows XP (this is a programming question), and
you are very likely to get exactly what you said you don't want.

Lots of luck!

--
Regards,

Richard Urban
Microsoft MVP Windows Shell/User

Quote from: George Ankner
"If you knew as much as you thought you know,
You would realize that you don't know what you thought you knew!"
 
T

Torgeir Bakken \(MVP\)

Gandalf2349 said:
just to clear things up right off the bat, I'm a software developer, so I'm
Windows savvy enough that you don't need to give me crap.

I'm working on a program that activly scans your desktop for unused items,
and I realized that the File Last Accessed always shows up as the exact date
and time you call it. Then I tried just viewing it under properties, and it
was giving me the exact time to the second that I right-clicked on the
shortcut. It seems to me that it's a waste of memory to save something that's
just calling a Time.

I'm using VB.Net and their File classes. I haven't run the .open sequence at
all, just gave it a filepath and called the last accessed date. If I can't do
that I don't see any way in which I can grab it without attempting to peek at
the memory, which I really do not want to do. If you can give me any help on
this I will be greatly appriciative.
Hi,

Right-clicking on a file and selecting Properties will always change
the access date, because Explorer is accessing the file to retrieve
several items of information. In Explorer, you can add "Date Accessed"
to be displayed in the "Details" view to see the "real" access date.

Also, using cmd.exe's "dir /TA" or the VBScript below shows me
different (real) access dates, so I would think it is the File class
in .Net that have the problem. I suggest you post in some of the .Net
developer newsgroups.

'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")
Set oFSO = CreateObject("Scripting.FileSystemObject")

sDesktopPath = oShell.SpecialFolders("Desktop")
Set oFolder = oFSO.GetFolder(sDesktopPath)
For Each oFile In oFolder.Files
sFileInfo = sFileInfo & oFile.DateLastAccessed & ", " & oFile.Name & vbCrLf
Next

WScript.Echo sFileInfo
'--------------------8<----------------------
 
H

HeyBub

Gandalf2349 said:
just to clear things up right off the bat, I'm a software developer,
so I'm Windows savvy enough that you don't need to give me crap.

Evidently not if you think "Properties" doesn't access the file (and thereby
alter the "File Last Accessed" date).
 
D

David Candy

If you f#ck with a file without the users intent then you fix the date back the way it was. Windows can't tell what is in your mind when you access the file. That is what Window's Search does. It is also what Desktop Cleanup does (and why are you duplicating XP's functions).
 

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