for example if I open a rtf/pdf document how I can check state of this document (file in use) this same question to all other files (txt , exe, ......)