[Toc][Index]

File Attributes and Time Stamps


Each file also has attributes, and one or more time stamps.  Attributes 
define characteristics of the file which may be useful to the operating 
system, to you, or to an application program.  Time stamps can record when 
the file was created, last modified, or last accessed.  Most CMD.EXE file 
processing commands allow you to select files for processing based on 
their attributes and/or time stamp(s). 
Each file on your system has four standard attributes.  Every time a 
program modifies a file, the operating system sets the Archive attribute, 
which signals that the file has been modified since it was last backed up. 
 This attribute can be used by CMD.EXE to determine which files to COPY, 
and by backup programs to determine which files to back up.  When the 
Read-only attribute is set, the file can't be changed or erased 
accidentally; this can be used to help protect important files from 
damage.  The Hidden and System attributes prevent the file from appearing 
in normal directory listings.  (Two additional attributes, Directory and 
Volume label, are also available.  These attributes are controlled by the 
operating system, and are not modified directly by CMD.EXE.) 
Attributes can be set and viewed with the ATTRIB command.  The DIR command 
also has options to select filenames to view based on their attributes, to 
view the attributes themselves, and to view information about normally 
"invisible" hidden and system files. 
When a file is created, and every time it is modified, the operating 
system records the system time and date in a time stamp in the file's 
directory entry.  Several CMD.EXE commands and variable functions, and 
many backup and utility programs, use this time stamp to determine the 
relative ages of files. 
On FAT volumes, only the single time stamp described above is available. 
 Files on HPFS volumes have three sets of time and date stamps.  The 
operating system records when each file was created, when it was last 
written or modified, and when it was last accessed.  The "last write" time 
stamp matches the single time stamp used on traditional FAT volumes. 
Several CMD.EXE commands and variable functions let you specify which set 
of time and date stamps you want to view or work with on HPFS volumes. 
 These commands and functions use the letter c to refer to the creation 
time stamp, w for the last write time stamp, and a for the last access 
time stamp. 
Additional information about disk files and file systems is available 
under Drives and Volumes, File Systems, Directories and Subdirectories, 
and File Names. 

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs