windows last-access time

Discussion in 'AutoCAD' started by wkiernan, Dec 30, 2004.

  1. wkiernan

    wkiernan Guest

    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?
     
    wkiernan, Dec 30, 2004
    #1
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 (here). After that, you can post your question and our members will help you out.