Check a drawing files date befor opening

Check a drawing files date befor opening

richie_hodgson
Collaborator Collaborator
954 Views
5 Replies
Message 1 of 6

Check a drawing files date befor opening

richie_hodgson
Collaborator
Collaborator

Is there a way to check a drawings date with lisp prior to opening it

 

What I want to achieve is copy a file from one directory to another but only if it is a laer version.

 

I can do the copy with vl-filecopy and this will probably take an unnoticeable amount of time as the file will be quite small but I am interested to see if this is achievable.

Richie
0 Likes
Accepted solutions (1)
955 Views
5 Replies
Replies (5)
Message 2 of 6

dlanorh
Advisor
Advisor

Check the following links. The second one is about scripting file system objects and may require some deep digging using (vlax-dump-object) to find what is available.

 

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/need-to-compare-quot-lsp-quot-last-m...

 

https://www.afralisp.net/archive/lisp/script1.htm

I am not one of the robots you're looking for

0 Likes
Message 3 of 6

pbejse
Mentor
Mentor
Accepted solution

@richie_hodgson wrote:

What I want to achieve is copy a file from one directory to another but only if it is a laer version.

 

I can do the copy with vl-filecopy and this will probably take an unnoticeable amount of time as the file will be quite small but I am interested to see if this is achievable.


 

True, That is exactly what I used. Also, look into  vl-file-systime.

 

Holler if you need help with this.

 

pBe

 

 

 

0 Likes
Message 4 of 6

pbejse
Mentor
Mentor

Stupid me, I did not check the posted link 😄

0 Likes
Message 5 of 6

ronjonp
Mentor
Mentor

You can also leverage xcopy with the '/D' switch to do this .. HERE is a link to some code that you can use within AutoCAD.

 

 

0 Likes
Message 6 of 6

richie_hodgson
Collaborator
Collaborator

That does sound promising. I will have a play and see what I can come up with.

Richie
0 Likes