Mark a file as read-only

Chipp Walters chipp at chipp.com
Wed May 12 01:37:04 EDT 2010


Something like this:

answer file "choose a file"
if the result is "cancel" or it is "" then exit to top
put it into tPath
put shortFilePath(tPath) into tPath
replace "/" with "\" in tPath
put "attrib +R " & tPath into tDosCommand
set the hideConsoleWindows to true
put shell (tDosCommand) into tErr
if tErr is not empty then answer tErr

Haven't tested it, but it should work.




On Tue, May 11, 2010 at 11:50 PM, Bill Vlahos <bvlahos at mac.com> wrote:

> Chipp,
>
> Do it like this?
> if the platform is "Win32" then shell("attrib +r a:lockthisfile.txt")
>
> Thank you,
> Bill Vlahos
> _________________
> InfoWallet (http://www.infowallet.com) is about keeping your important
> life information with you, accessible, and secure.
>
> On May 11, 2010, at 7:39 PM, Chipp Walters wrote:
>
> > http://www.csulb.edu/~murdock/attrib.html
> >
> > attrib +r a:lockthisfile.txt
> >
> > You can shell out to it
> >
> > Chipp Walters
> > CEO, Shafer Walters Group, Inc
> >
> > On May 11, 2010, at 8:56 PM, Bill Vlahos <bvlahos at mac.com> wrote:
> >
> >> I know how to set the rights on Mac and Linux to mark a file as
> read-only.
> >>
> >> How do I do that in Windows?
> >>
> >> Can I do it at all on a USB drive? I believe that files on USB drives
> ignore some settings for ownership, etc.
> >>
> >> Bill Vlahos
> >> _________________
> >> InfoWallet (http://www.infowallet.com) is about keeping your important
> life information with you, accessible, and secure.
> >>
> >> _______________________________________________
> >> use-revolution mailing list
> >> use-revolution at lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-revolution
> > _______________________________________________
> > use-revolution mailing list
> > use-revolution at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list