How to check whether a file/dir is writable in batch scripts
As far as I know, you can find out whether the file exists or not, but there's no way to know if it's writeable, apart from trying to write on it. It's not only a matter of not having the R flag; network and NTFS permissions are involved as well (and probably group policies too).
If you can rewrite your code, you can capture the return code of the write operation trough the errorlevel.