By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.
SignUp Now!I was talking about permissioms too (seemingly screwy ones). "<Profile>\Application Data" is not readable because of a peculiar "permission".I suspect the OP is thinking about permissions.
Writable is the easy one (as you said, just try it). I don't fully understand and I don't know how robust this is, but "EXIST *" seems to be able to tell the difference between an empty directory (where it's true?) and a directory that you can't read (where it's false). Note that "EXIST NUL" doesn't work.Not arguing with you, Vince. I've never understood those either.
To the original suggestion: The easiest way to find out whether a directory is readable is to try reading it. The easiest way to find out whether it's writable is to try writing to it — e.g. try creating and deleting a temp file there. My first thought would be to write it as a function, which could then be used in IF, IF, etc. as desired.
v:\> if exist "c:\Users\vefatica\Application Data"\* echo foo
v:\> if exist v:\empty\* echo foo
foo