Batch changing of archive attribute

  • Thread starter Musawwir Spiegel
  • Start date
M

Musawwir Spiegel

I do my backups by means of DOS batch files that copy to CDs the files
in certain directories that have their archive attributes set on.

I have now bought a new machine running XP. I want to set the archive
attributes off in all files in certain directories whose file dates
are earlier than a particular date.

In order to do this, I did a search for all files whose file dates
satisfied my need and which were located in the particular
directories. When the search was complete, I selected all of the
found files and tried to set their archive bits off by using the
File/Properties dialog. However, the results were uneven.

Does anybody have a better way to do this?

Musawwir Spiegel
(e-mail address removed)
 
J

Jon

You could perhaps temporarily copy the files identified after your search to
a temporary folder, open up a command prompt, in the folder and issue the
command

attrib -a *.*

Then copy them back (depending on how many directories are involved of
course).

Jon
 
P

Pegasus \(MVP\)

Musawwir Spiegel said:
I do my backups by means of DOS batch files that copy to CDs the files
in certain directories that have their archive attributes set on.

I have now bought a new machine running XP. I want to set the archive
attributes off in all files in certain directories whose file dates
are earlier than a particular date.

In order to do this, I did a search for all files whose file dates
satisfied my need and which were located in the particular
directories. When the search was complete, I selected all of the
found files and tried to set their archive bits off by using the
File/Properties dialog. However, the results were uneven.

Does anybody have a better way to do this?

Musawwir Spiegel
(e-mail address removed)

A more elegant way would be to use xxcopy.exe
to copy your files, followed by attrib.exe /s /b to
reset their attributes. With xxcopy (which you need
to download), you can select which files are to be
copied: Either those before a given date or after a
given date. xcopy.exe is sadly lacking in this regard.
 

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