How to set a files 'locked' property?

Chipp Walters chipp at chipp.com
Wed Sep 25 01:00:01 EDT 2002


Jan,

Thanks for the pointer. I worked it with the following:

if the platform is "Win32" then
   put the filename of the topstack into tfile
   replace "/" with "\" in tfile
   put "attrib"&& quote & tfile & quote && "-R" into DosCommand
   set the hideConsoleWindows to true
   put shell (DosCommand) into theError
end if

It turns out I had to put the filename in quotes as the path contained a
space and wouldn't execute under DOS unless quoted. Thanks again.

-Chipp

> -----Original Message-----
> From: use-revolution-admin at lists.runrev.com
> [mailto:use-revolution-admin at lists.runrev.com]On Behalf Of Jan Schenkel
> Sent: Wednesday, September 25, 2002 12:29 AM
> To: use-revolution at lists.runrev.com
> Subject: Re: How to set a files 'locked' property?
>
>
> Hi Chipp,
>
> Unfortunately it's not as simple as
>   set the lockText of file tFile to true
> *grin*
>
> What you can do, is let WinXP do it for you with
>   get shell("attrib" && tFile && "-R")
>
> If you ever need to do it on a Mac, I'm sure someone
> can tell you the equivalent piece of AppleScript to
> execute...
>
> Hope this helped,
>
> Jan Schenkel.
>
> "As we grow older, we grow both wiser and more foolish
> at the same time"  (De Rochefoucald)
>
> --- Chipp Walters <chipp at chipp.com> wrote:
> > I know there's been discussion here lately on how to
> > find out if a file is
> > locked in WinXP
> >
> > put the detailed files()
> >
> > but, how can you turn off the locked property for an
> > existing file? Couldn't
> > find it in the notes. Thanks for any help.
> >
> > -Chipp
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list