|
-
Sep 7th, 2000, 07:28 PM
#1
Thread Starter
Hyperactive Member
How do I set a file to read only. There is an html document in my Temporary Internet Files directory that I'd like to make read only. However, Windows will not give me the option to do it.
-
Sep 7th, 2000, 07:32 PM
#2
Fanatic Member
-
Sep 7th, 2000, 07:33 PM
#3
Use SetAttr function.
Code:
SetAttr "MyFile", vbReadOnly
-
Sep 7th, 2000, 07:52 PM
#4
Thread Starter
Hyperactive Member
Thanks
Thanks guys I'll give it a shot.
-
Oct 11th, 2000, 11:48 AM
#5
Frenzied Member
Megatron,
what about un-read only
is it
set attr "myfile", vbNormal
??
Thanks
Wengang
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
Oct 11th, 2000, 01:27 PM
#6
Frenzied Member
wengang,
Yes. The vb intrinsic constants for file properties are:
Code:
vbNormal 0 Normal (default)
vbReadOnly 1 Read-only
vbHidden 2 Hidden
vbSystem 4 System file
vbArchive 32 File has changed since last backup
The sum of these attributes defines the end result, so if you want a file to be read-only AND hidden, you do this:
Code:
SetAttr "Path\FileName.ext", vbReadOnly + vbHidden
[Edited by seaweed on 10-11-2000 at 02:30 PM]
-
Oct 11th, 2000, 01:57 PM
#7
I have a data file that can be read my program, i save it as notepad file... how can i make it as write only when they click on the data file... but only readable and writeable by my program... thanks
-
Oct 11th, 2000, 02:17 PM
#8
Use encryption instead of SetAttr for that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|