No you can't. Just because, for example, notepad has "file.txt" open doesn't mean file.txt "is in use". If the file is in use, you can't write to it.