[EMAIL PROTECTED] (David S. Rosinger) writes:
> ActivePerl contains a module named `Win32::File' for this purpose.
> The program below illustrates its use. First it creates a sample
> file and sets its attributes to READONLY and ARCHIVE. If the program
> is run a second time, the READONLY attribute is removed.
>
> The attributes of the sample file and some standard WINNT files
> are displayed by the sub `attributes'.
Wendy,
As a followup to my own post, I just realized that the following line
has the effect of *toggling* the `readonly' bit:
SetAttributes(SAMPLE_FILE, $attr ^ READONLY);
If you want to *clear* the `readonly' attribute, you'll want to do this
instead:
SetAttributes(SAMPLE_FILE, $attr & ~READONLY);
--David
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]