Re: Read Only / Thanks Keith.

From: samson (anonymous_at_discussions.microsoft.com)
Date: 03/17/04


Date: Tue, 16 Mar 2004 22:25:35 -0800

Thanks Keith.

>-----Original Message-----
>Start -> All Programs -> Accessories - Command Prompt
>
>'attrib' without any parameters will display a directory
list of the files in the current directory and what
attributes they have set.
>
>To see attributes for a particular folder specify the
folder name, i.e:
>
>C:\Documents and Settings\Keith\My Documents>attrib "my
music"
>
>will display:
>
> R C:\Documents and Settings\Keith\My
Documents\My Music
>
>indicating the read-only attribute is set. To clear the
read-only attribute, use:
>
>C:\Documents and Settings\Keith\My Documents>attrib -
r "my music"
>
>The full syntax of the command follows (pasted from Help
& Support :)
>
>Good Luck,
>Keith
>
>Attrib
>Displays, sets, or removes the read-only, archive,
system, and hidden attributes assigned to files or
directories. Used without parameters, attrib displays
attributes of all files in the current directory.
>Syntax
>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.
> +a
> Sets the archive file attribute.
> -a
> Clears the archive file attribute.
> +s
> Sets the system file attribute.
> -s
> Clears the system file attribute.
> +h
> Sets the hidden file attribute.
> -h
> Clears the hidden file attribute.
> [Drive:][Path] FileName
> Specifies the location and name of the directory,
file, or set of files for which you want to display or
change attributes. You can use wildcard characters (that
is, ? and *) in the FileName parameter to display or
change the attributes for a group of files.
> /s
> Applies attrib and any command-line options to
matching files in the current directory and all of its
subdirectories.
> /d
> Applies attrib and any command-line options to
directories.
> /?
> Displays help at the command prompt.
>Remarks
> a.. Working with groups of files
> You can use wildcard characters (that is, ? and *)
with the FileName parameter to display or change the
attributes for a group of files. If a file has the system
or hidden attribute set, you must clear these attributes
before you can change any other attributes for that file.
>
> b.. Using the archive attribute
> The archive attribute (that is, +a) marks files that
have changed since the last time they were backed up. The
xcopy command uses archive attributes. For more
information about archive attributes and xcopy, see
Related Topics.
>
> c.. The attrib command, with different parameters, is
available from the Recovery Console.
>Examples
>To display the attributes of a file named News86 located
on the current drive, type:
>
>attrib news86
>
>To assign the read-only attribute to the file named
Report.txt, type:
>
>attrib +r report.txt
>
>To remove the read-only attribute from files in the
\Public\Jones directory on a disk in drive B and from
files in any subdirectories of \Public\Jones, type:
>
>attrib -r b:\public\jones\*.* /s
>
>Consider a scenario where you want to give an associate
a disk containing all files in the default directory on a
disk in drive A, except files with the .bak extension.
Because you can use xcopy to copy only those files marked
with the archive attribute, you need to set the archive
attribute for those files you want to copy. First, you
need to set the archive attribute for all files on drive
A. Second, you need to clear the archive attribute for
those files with the .bak extension. For example, type:
>
>attrib +a a:*.* attrib -a a:*.bak
>
>Next, use xcopy to copy the files from the disk in drive
A to the disk in drive B. The /a command-line option in
the following command causes xcopy to copy only those
files marked with the archive attribute. For example,
type:
>
>xcopy a: b: /a
>
>If you want xcopy to clear each file's archive attribute
after it copies the files, use the /m command-line option
instead of /a. For example, type:
>
>xcopy a: b: /m
>
>Formatting legend
> Format Meaning
> Italic Information that the user must supply
> Bold Elements that the user must type exactly as
shown
> Ellipsis (...) Parameter that can be repeated
several times in a command line
> Between brackets ([]) Optional items
> Between braces ({}); choices separated by pipe
(|). Example: {even|odd} Set of choices from which the
user must choose only one
> Courier font Code or program output
>
>
>*********************************************************
*******
>
>
><anonymous@discussions.microsoft.com> wrote in message
news:aaa501c40ac9$6e13eb80$a601280a@phx.gbl...
>>
>> Thanks for your reply. Will you or anyone, Please give
me
>> details explanation of this statement of yours,
>> "To set or clear the attribute, use the 'attrib'
command
>> in a command prompt window".
>>
>>
>> >-----Original Message-----
>> >The Read-only box in the properties dialog for a
folder
>> does not accurately reflect nor is it able
>> >to set or clear the read-only bit for a folder. More
>> importantly, the read-only bit for a folder
>> >does not govern whether or not a folder can be
written
>> to, but tells explorer whether or not to
>> >process the desktop.ini file within that folder.
>> >
>> >To accurately view the state of the attribute, add
>> the 'attribute' column to an explorer window in
>> >detail view. To set or clear the attribute, use
>> the 'attrib' command in a command prompt window.
>> >
>> >Keith
>> >
>> >"Samson" <anonymous@discussions.microsoft.com> wrote
in
>> message
>> >news:9b9c01c40987$bf900c20$a601280a@phx.gbl...
>> >> My OS is Ws XP. When I Uncheck box to change the
read
>> >> only attributes of the some folders, I couldn't so.
Any
>> >> help please? Thanks.
>> >
>> >.
>> >



Relevant Pages

  • Re: Read Only / Thanks Keith.
    ... >>'attrib' without any parameters will display a directory ... > xcopy command uses archive attributes. ... > a disk containing all files in the default directory on a ...
    (microsoft.public.windowsxp.general)
  • Re: Read Only
    ... Start -> All Programs -> Accessories - Command Prompt ... 'attrib' without any parameters will display a directory list of the files in the current directory and what attributes they have set. ... For more information about archive attributes and xcopy, ...
    (microsoft.public.windowsxp.general)
  • Re: Display problems in Vista
    ... Very small overhead. ... the command packet needs to be transfered. ... have to display a line that is x pixels wide at any zoom level. ...
    (comp.graphics.api.opengl)
  • Re: Removing Hidden status?
    ... explanation as to why these are hidden anyway, ... operating system and various programs should treat the file or folder ... You can only view the System attribute by using the attrib command or by ... To use the attrib command. ...
    (microsoft.public.windowsxp.general)
  • Problem linking two list boxes
    ... mode, but Access does not allow this, so I have an unbound form with two ... I want to display data in the second list box which is filtered from the ... query using the common field. ... I have a command button on the form that launches a separate modal ...
    (microsoft.public.access.formscoding)