Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Login
Register
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
testing to see if a file is open (write-line)
« previous
next »
Print
Pages: [
1
] |
Go Down
Author
Topic: testing to see if a file is open (write-line) (Read 1526 times)
0 Members and 1 Guest are viewing this topic.
psuchewinner
Guest
testing to see if a file is open (write-line)
«
on:
July 06, 2010, 03:27:08 PM »
Is there a way to test to see if a file that has been opened?
Example
(setq f (open "c:\bla-bla.txt" "a"))
How can I tell if it is open?
Logged
kpblc
Bull Frog
Posts: 396
Re: testing to see if a file is open (write-line)
«
Reply #1 on:
July 06, 2010, 03:33:10 PM »
(vl-file-systime "c:\bla-bla.txt")
Logged
Sorry for my English.
efernal
Bull Frog
Posts: 206
WWW
Re: testing to see if a file is open (write-line)
«
Reply #2 on:
July 06, 2010, 04:31:14 PM »
I allways use this and works...
(IF (SETQ o_file (OPEN file "w"))
(PROGN
....
)
(ALERT "Error on opening file...")
)
e.fernal
Logged
e.fernal
psuchewinner
Guest
Re: testing to see if a file is open (write-line)
«
Reply #3 on:
July 07, 2010, 10:25:37 AM »
Thanks e.fernal, that was exactly what I needed! Im rolling now!
Logged
efernal
Bull Frog
Posts: 206
WWW
Re: testing to see if a file is open (write-line)
«
Reply #4 on:
July 07, 2010, 02:41:45 PM »
glad to help...
e.fernal
Logged
e.fernal
Print
Pages: [
1
] |
Go Up
« previous
next »
TheSwamp
»
Code Red
»
AutoLISP (Vanilla / Visual)
»
Topic:
testing to see if a file is open (write-line)