Build on Mac for Win
Kurt Kaufman
kkaufman at snet.net
Thu Apr 17 20:41:00 EDT 2003
David wrote:
"...I just read Jan Schenkel's contribution.
Sadly, I don't understand it. Help anyone?..."
get shell ("attrib -r" && tFileName)
If you look at the Transcript Dictionary's definition for "shell",
you'll see that DOS commands can be used in the Windows environment to
change a file's attributes (such as whether it is read-only or not).
Above, the "attrib -r" means that the file is to be made "writable",
and the "tFileName" is a name for a variable in which you can place the
path to the stack that you wish to make "writable".
From Windows 2000 Help Files, a part of the entry for the command
"attrib":
Attrib
Displays or changes file attributes.
This command displays, sets, or removes the read-only, archive, system,
and hidden attributes assigned to files or directories.
attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [[drive:][path] filename]
[/s[/d]]
Parameters
+r
Sets the read-only file attribute.
-r
Clears the read-only file attribute.
[[drive:][path] filename] <---(this path can be stored in
"tFileName" if necessary)
Specifies the location and name of the directory, file, or set of files
you want to process. You can use wildcard characters (? and *) in the
filename parameter to display or change the attributes for a group of
files.
More information about the use-livecode
mailing list