PDA

View Full Version : List of dwg files based on creation date.



cpapakon353401
2013-01-22, 10:19 AM
I am trying to review sets of drawings based on the creation date of the dwg.
I noticed that the creation date listed in windows 7 explorer has nothing to do with the actual creation date of the dwg (which is shown via time command - or through advanced properties/history in the explorer).
I want some short of table/list/spreadsheet that will include a list of the dwg files in a folder shown basic metadata (basically I am only interested in file creation exact time)
Any help will be greatly appreciated

thank you
Christos

Ed Jobe
2013-01-22, 03:26 PM
The quickest way is the dos DIR command and a pipe. /t:c specifies the creation date, and /o:d orders by the date column. > pipes the output to a text file.

dir /t:c /o:d > filelist.txt

cadtag
2013-01-22, 05:35 PM
Given the way Acad saves drawings after editing, I think any creation date that Windows can see is going to be inherently bogus. Each dwg is a a new file when it's saved -- initially named with a temp name, then the old .dwg is renamed to .bak, and the temp file renamed to the original dwg file name. So 'file creation date' as far as windows can see, would the the moment that temp file is created.

You can display the column in Explorer, or as Ed notes, but I suspect it's not going to be at all meaningful.

cpapakon353401
2013-01-22, 05:50 PM
Given the way Acad saves drawings after editing, I think any creation date that Windows can see is going to be inherently bogus. Each dwg is a a new file when it's save -- initialkly named with a temp name, then the old .dwg is renamed to .bak, and the temp file renamed to the original dwg file name. So 'file creation date' as far as windows can see, wold the the mioment that temp file is created.

You can display the column in Explorer, or as Ed notes, but I suspect it's not going to be at all meaningful.


I agree I did what Ed suggested but it did not work.
You see in explorer when you right click on a file and go to the statistics tab it mentions the correct creation date and time of a file.
Everywhere else the time is bogus.
Is there any way to extract automatically or somehow see the creation time stated in "statistics" in explorer or in any other file?

Ed Jobe
2013-01-22, 06:33 PM
The "Statistics" tab is only for *.dwg files and is added by Windows to get the info from the dwg. Notice it also has the editing time, another acad var stored in the dwg. There's no "automatic" way I know of, but you could probably write a .NET app to do it. Try searching the programming forums to see if someone already has.

BTW, the other times available for display by DIR are /t:a = last accessed; /t:w = last written

cadtag
2013-01-22, 06:38 PM
I believe you would have to go into DWGPROPS - possbily using ObjectDBX to extract that information.

Caveat -- I don't know how realistic that will be either - it will all depend on how a give drawing was created. for example -- the cover sheet on a recent job (using DWGPROPS) shows a creation date under statistics of May 1999, but the General tab shows a created date of Sept 2012, which is probably more accurate.

BlackBox
2013-01-22, 07:34 PM
I had already wrote some code for this quickly... When I thought to include an option to convert Julian to the desired format, and stumbled upon Lee's prior post here (http://www.theswamp.org/index.php?topic=35156.msg403699#msg403699) which includes everything. :beer:

BlackBox
2013-01-22, 07:36 PM
Also... To the topic of employing ObjectDBX to iterate a directory of drawings, you should be able to pull what you need from my old post here (http://forums.augi.com/showthread.php?141532-Searching-for-C3D-surfaces-within-drawings&p=1183732&viewfull=1#post1183732).

Ed Jobe
2013-01-22, 10:43 PM
I had already wrote some code for this quickly... When I thought to include an option to convert Julian to the desired format, and stumbled upon Lee's prior post here (http://www.theswamp.org/index.php?topic=35156.msg403699#msg403699) which includes everything. :beer:

Looks like Lee's code also gets the OS creation date, the same value returned by DIR.

BlackBox
2013-01-22, 10:54 PM
Looks like Lee's code also gets the OS creation date, the same value returned by DIR.

Perhaps that relegates us to coding a .NET LispFunction Method, which employs the System.IO.FileGetCreationTime() (http://msdn.microsoft.com/en-us/library/system.io.file.getcreationtime.aspx) Method?

Ed Jobe
2013-01-22, 11:22 PM
I believe that would give the same time. See the third post.

cpapakon353401
2013-01-23, 06:55 AM
The time that I am interested in If I am not mistaken is metadata in the dwg.