You could try renaming the file instead of deleting.
If the rename fails then file is open or locked. Buddy From: [email protected] [mailto:[email protected]] On Behalf Of Stephen Markson Sent: Friday, April 15, 2016 10:35 AM To: [email protected] Subject: [RBASE-L] - test if a pdf file is in use Hello, Does anyone have a technique to determine if a pdf file is in use (i.e. open in a pdf reader or editor)? I know that if the file is in use, OUTPUT filename.pdf causes an error in R:Base. Therefore, this can be used to determine if the file is in use. However, if the file exists and is not in use, OUTPUT filename.pdf deletes the contents of the file. Is there a non-destructive way to check? Thanks for any help with this. Regards, Stephen Markson The Pharmacy Examining Board of Canada 416.979.2431 x251 -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "RBASE-L" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

