Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why Does Win Automatically Add The Archive Attribute?

Status
Not open for further replies.

roystreet

Programmer
Oct 12, 2000
146
US
Hello,
I'm not sure if it's windows or MS Office, but I'm pretty sure it's windows. I have several word documents & I've noticed after a short time some of the files have the archive attribute added to them. I'm not sure if there is a setting somewhere, where I can change it so that windows doesn't do that? It only became an issue because I have designed a batch file that will move files that I've added the archive attribute to from the "Active" folder to a "Archive" folder. Now, I can see the ones that are getting that attribute because it's moving them. So, is there a reason why windows is changing it or a way to stop it?

Thanks,
-roystreet
 
By Default I think Windows sets this "archive attribute" whenever a file is written to after the initial file creation.


As far as changing Attributes, have a look at the files / folders, Properties/ Attributes/ Advanced. Or see what the DOS Attrib Command offers you.
 
Thank you for your response. That is unfortunate that it does this, so I will have to find another method of having the batch file archive. I can manually go in & change the attributes each time (Which is what I've done a few different times), but that's not going to be very efficient. If you know of a way to stop windows from doing this, it would be very helpful.

But I really do appreciate your response - At least I know what's happening & why. It seems kinda silly that it does that. (In my opinion)

Thanks,
---roystreet
 
Windows sets the Archive bit to indicate that the file needs to be backed up in the next incremental backup. After the file is backed up via an incremental backup the Archive bit is removed so that the next time the backup software runs it knows that the file has not been updated and that the file does not need to be backed up.

I believe that this is that standard procedure across platforms, and it probably can't be changed.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Hi, Roystreet

- Before you set your archive bits, you could run a batch file which will first of all reset them all (attrib -a *.*). Then set your own archive bits and do your archiving as at present.

- Or, if this is not practical, maybe use the read only attribute instead. I assume once you flag the file to be archived you don't want it being updated so it would be OK to make it read only. Then, your archiving batch file would look for read-only files and first of all reset the read only bit on each file before it moves it to archive.

Jock
 
Hi, again

Just realized this is the Vista forum. As such my last post may not be appropriate as I have little Vista experience. Maybe after SP1 I will take the plunge; as yet none of my custs are running Vista - still buying XP boxes due to compatibility and performance issues.

Jock
 
Hello - First, thanks to everyone for your assistance. It looks like my best bet is going to redesign my batch to include read-only files. Using robocopy & the /IA:R option will include only those I believe.

Unless someone has a better idea than me? :)

Thanks...
---roystreet

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top