Sub SetReadOnly(ApplyFolder As String, ApplyFileName As String) 'ignore
Dim r As Reflector
r.Target = r.CreateObject2("java.io.File", Array As String(ApplyFolder, ApplyFileName), Array As String("java.lang.String", "java.lang.String"))
r.RunMethod("setReadOnly")
End Sub
I have a question, why in the above example the function (is ignored) doesn't work? I'm looking for a way to set the Read-Only attribute for a folders and a files. Any ideas, an example is also welcome.
Wow! Super! @PaulMeuris
Just what I was looking for - thanks a lot .
Initially, in my tests, I had the Hiden attribute set on the objects on which I was going to set READ-ONLY and it didn't work out, so I decided that I must be wrong in naming the attributes.
But already tamed ?
+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
I Not content indexed file attribute.
X No scrub file attribute.
V Integrity attribute.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.
/L Work on the attributes of the Symbolic Link versus
the target of the Symbolic Link
Wow! Super! @PaulMeuris
Just what I was looking for - thanks a lot .
Initially, in my tests, I had the Hiden attribute set on the objects on which I was going to set READ-ONLY and it didn't work out, so I decided that I must be wrong in naming the attributes.
But already tamed ?