Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Alternatives  





3 See also  





4 References  














Archive bit






Deutsch
 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


The archive bit is a file attribute used by CP/M, Microsoft operating systems, OS/2, and AmigaOS. It is used to indicate whether or not the file has been backed up (archived).

Usage[edit]

In Windows and OS/2, when a file is created or modified, the archive bit is set (i.e. turned on), and when the file has been backed up, the archive bit is cleared (i.e. turned off). Thus, the meaning of the archive bit is "this file has not been archived". In CP/M, the meaning is inverted: creating or modifying a file clears the archive bit, and the bit is set when the file is backed up.

Backup software may provide the option to do a full backup while clearing archive bits – that is, to back up all files regardless of their archive bit status, and to clear the archive bit for all files processed by the backup. This allows for the creation of an initial full backup that will be supplemented by incremental backups in the future. Later, the incremental backup task uses the archive bit to distinguish which files have already been backed up, and selects only the new or modified files for backup.

The operating system never clears the archive bit unless explicitly told to do so by the user. Even when a user explicitly tells the operating system to copy a file for the purpose of archiving it, the archive bit will still not be cleared. A specific command for clearing or setting the bit must be executed. On the other hand, whenever a file with a clear archive bit is modified (edited), or copied or moved to a new location, the operating system will set the archive bit on the target file. Typically on a file system that has never been formally backed up, nearly all of the files will have their archive bits set, as there are few applications that make use of archive bits without the user's request.

InMS-DOS as well as nearly all versions of Windows, status of the archive bit can be viewed or changed with the attrib command-line utility, or by viewing the properties of a file with the Windows shellorWindows Explorer. The archive bit's status can also be viewed or changed with the GetFileAttributes,[1] GetFileAttributesEx,[2] and SetFileAttributes[3] Windows APIs. The archive bit can be set or cleared with the attributes property[4]inVBScriptorJScript.

The archive bit is a file attribute and not part of the file itself, so the contents of the file remain unchanged when the status of the archive bit changes.

Alternatives[edit]

Relying on the archive bit for backing up files can be unreliable if multiple backup programs are setting and clearing the archive bit on the same volume.[5] Another possibility is to use the timestamp of the last change to the file or directory. This is typically the technique used in UNIX-like operating systems.

See also[edit]

References[edit]

  1. ^ "GetFileAttributes function (Windows)". msdn.microsoft.com. Retrieved 2017-10-19.
  • ^ "GetFileAttributesEx function (Windows)". msdn.microsoft.com. Retrieved 2017-10-19.
  • ^ "SetFileAttributes function (Windows)". msdn.microsoft.com. Retrieved 2017-10-19.
  • ^ "Attributes Property". msdn.microsoft.com. 17 July 2015. Retrieved 2017-10-19.
  • ^ "The Windows archive bit is evil and must be stopped". 28 March 2005.

  • Retrieved from "https://en.wikipedia.org/w/index.php?title=Archive_bit&oldid=1169303908"

    Categories: 
    Computer archives
    Computer file systems
    Metadata
    Hidden categories: 
    Articles with short description
    Short description matches Wikidata
    Articles needing additional references from October 2017
    All articles needing additional references
     



    This page was last edited on 8 August 2023, at 07:52 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki