Clearing the archive attribute

S

Solitary Soul

Hi Gang,

I want to clear the archive attribute for EVERY file in a partition
- INCLUDING "hidden" and "system" files.

How do I get the ATTRIB command to do this?
... or is there a better alternative?


Thanks,

Solitary Soul
=======================
 
P

Pegasus \(MVP\)

Solitary Soul said:
Hi Gang,

I want to clear the archive attribute for EVERY file in a partition
- INCLUDING "hidden" and "system" files.

How do I get the ATTRIB command to do this?
... or is there a better alternative?


Thanks,

Solitary Soul
=======================

C:\>attrib /?
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:] [path] filename]
[/S [/D]]

+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.

If you wish to deal with hidden/system files too then you
have to reset their hidden/system attributes at the same
time, using this switch combination: -a -s -h.
 
S

Solitary Soul

Solitary Soul said:
Hi Gang,

I want to clear the archive attribute for EVERY file in a partition
- INCLUDING "hidden" and "system" files.

How do I get the ATTRIB command to do this?
... or is there a better alternative?


Thanks,

Solitary Soul
=======================

C:\>attrib /?
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:] [path] filename]
[/S [/D]]

+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.

If you wish to deal with hidden/system files too then you
have to reset their hidden/system attributes at the same
time, using this switch combination: -a -s -h.

OK - thanks - but I knew this - if I change the system and/or the hidden attributes,
then how would I selectively change them back after clearing the archive attribute?

I suppose, if I had to, I could write a program to do this,
but I was thinking that someone else has had this problem,
and there would already be a solution.


Solitary Soul
=======================
 
P

Pegasus \(MVP\)

Solitary Soul said:
Solitary Soul said:
Hi Gang,

I want to clear the archive attribute for EVERY file in a partition
- INCLUDING "hidden" and "system" files.

How do I get the ATTRIB command to do this?
... or is there a better alternative?


Thanks,

Solitary Soul
=======================

C:\>attrib /?
Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [[drive:] [path] filename]
[/S [/D]]

+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.

If you wish to deal with hidden/system files too then you
have to reset their hidden/system attributes at the same
time, using this switch combination: -a -s -h.

OK - thanks - but I knew this - if I change the system and/or the hidden attributes,
then how would I selectively change them back after clearing the archive attribute?

I suppose, if I had to, I could write a program to do this,
but I was thinking that someone else has had this problem,
and there would already be a solution.


Solitary Soul
=======================

Many years ago I got disgusted with certain limitations of the attrib
command, so wrote my own. If you check Google then I'm sure you
can find lots of downloadable ones that work in a similar way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top