EasyManua.ls Logo

Commodore PC 20 - Page 165

Commodore PC 20
494 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Attrib
Purpose:
Sets
or
resets
the
read-only
attribute
of
a file,
or
displays
the
attri-
butes
of
a file.
Syntax:
attrib
[±r)
[±a)
[drive:)patbname
Comments:
If
an application
opens
a file
with
read
and
write
permission,
attrib
forces read-only
mode
to
allow file sharing
over
a network.
+ r sets
the
read-only
attribute
of
a file.
- r disables read-only mode.
+ a sets
the
archive attribute
of
a file.
- a clears
the
archive attribute
of
a file.
[ drive: )patbname specifies the
name
of
the
drive
and
the
full
path
name
of
the
file you
want
to
reference.
The
backup,
restore,
and
xcopy
(mcopy)
commands
use
the
archive
attribute
to
control
a selective
backup/restore/xcopy
on
files
that
have
been
modified. You
can
use
the
+ a
and
- a
options
to
select files that you
want
to
back
up
with
the
backup
1m switch,
or
copy
with
the
xcopy
(or
mcopy)
1m
or
fa
switches.
To display
the
attribute
of
a specific file
on
the
default drive, type
the
attrib
command
followed
by
the
patbname
of
the
file.
To
print
the
attributes
of
all files in a specific directory,
use
the
wild-
card
abbreviation •.• in
the
pathname.
Examples:
The
following example gives
the
file report
txt
read-only
permission:
attrib
+r
report.txt
Suppose
you
want
to
use
the
xcopy
command
to
copy
all
the
files
in
the
default
directory
of
drive
A,
except
for those
that
have an
extension
oLbak,
to
drive
B.
You
would
type
the
following:
attrib
+a
a:*.*
attrib
-a
a:*.bak
MS-DOS Commands
271
Attrib
Changing read and
write permission

Table of Contents

Related product manuals