-
Hey everyone
Is it possible to get VB to lock a txt file so that it cannot be edited by another prog (e.g. Notepad), even over a network?
Thanks for any help received.
Regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it :)
-
you can do it with DOS and shell the program from VB. just
Code:
Can'ttouchthis = Shell(attrib +R C:\pathname.txt)
I think that's right anyway.
bob
-
Thanks Bob, i will give it a shot
Regards,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it :)
-
but that can still be opened
attrib +r means that the file is only read only.
that means that it can still be opened and changed by someone who knows how to use attrib, windows or microsoft word.
why don't you encrypt the file?
i have a encrypter that be incorporated into vb if you want, just email me :)
------------------
david
Teenage Programmer
-
Thanks Dave but I was really after a way to lock the file, like Explorer.exe which cannot be deleted or moved or anything. The trouble with encryption is they could just delete the symbols and my security system would be ruined...
Thanks anyway,
------------------
- Chris
[email protected]
If it ain't broke - don't fix it :)