windows last-access time
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
windows last-access time

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
wkiernan
Guest





Posted: Thu Dec 30, 2004 11:41 pm    Post subject: windows last-access time Reply with quote

I'm trying to figure out how to know when I can take AutoCAD files off our network server and archive them. A few years back I used to do it by looking at the "last modified" time on the file, e.g.

I:\project\sur\0313-0654-00\dwg>dir inside.dwg
Volume in drive I is stp_i
Volume Serial Number is F0F2-0F98

Directory of I:\project\sur\0313-0654-00\dwg

12/30/2004 11:53 AM 27,339 inside.dwg

the last-modified time of INSIDE.DWG is 11:53 AM, 12/30/2004.

I'd search the drawing directories on the server and if none of the files in a directory had been modified in the last year, I'd assume the those files were inactive and I could archive them (copy them to CDs and delete them from the server).

That doesn't work any more, because nowadays we use a lot of XREFs. A older drawing file might be in use every day as an XREF, but its "last-modified" time could be two years ago. But if I remove it from the server, it breaks a drawing currently in use; when the user opens up the "main" drawing he'll get an error message . On NTFS file systems, Windows also keeps track of the creation time and the last-accessed time of files. So my next thought was to use the "last-accessed" time instead.

I was surprised to find out that it's not the Windows operating system which keeps track of the "last access" time, but instead Windows expects the application which accesses the file to update the "last-accessed" time for the file. And it appears that when AutoCAD 2000i opens a file to read, either the "main" drawing file or any XREF files which are attached, it does not update the "last-accessed" time. AutoCAD updates the "last-accessed" time of the "main" drawing when you save it (and it updates the "Last-modofied" time as well) but it doesn't update the "last-accessed" or "last modofied" time for XREF files.

Is it possible to make AutoCAD 2000i do that (update the "last-accessed" time for XREFs)? If not, I suppose one could put some code in ACADDOC.LSP which uses the vlr-xref-reactor and vlr-dwg-reactor functions to write some kind of information to a file so I could keep track of which files had been accessed in the last year, or rather which files had _not_ been accessed. Any suggestions?

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Contact Us
Powered by phpBB