Daddy Bob

DADDY BOB'S COMPUTER Q & A

 

March 1, 2009

Q. I have a template file that I use weekly that I want to set so that it cannot be changed and will force me, after I have filled it out, to save it with a different name. How can I do that?

A. What you can do is set the files Read-Only attribute bit which will prevent the file from being saved without giving it a new name. To explain further, let's say that you are writing a weekly newsletter of some kind. Parts of this letter like the headings, logo, etc., are the same each week, and all you want to do is fill in the text. So you create a template in Word with all the reusable headers, logo, etc., in it and save it as "newsletter template.doc".

Now, when you open this template and add the text to this template, it is easy to accidently click Save instead of Save As, and overwrite the template with the filled in news letter. If you set the read-only attribute on the template file, you can still open it and fill it in, but you cannot save it unless you give it a different name. This saves the integrity of the template.

There are six attributes but only four that any folder or file can have that are easily changed by the user. They are Bit-0 Read=Only, Bit-1 Hidden, Bit-2 System, and Bit -5 Archive; simply abbreviated as R, H, S, and A. Bits 3 and 4, for Volume Label and Directory, are pretty much controlled by the operating system so I won't cover then here. Since the days of DOS V2, these attributes can be changed by using the application called "attrib" from the command prompt. Since Windows 95, they can be changed without using the command prompt. Here is briefly what they do.

Read-Only:
Most software, when seeing a file marked read-only, will refuse to delete, modify or overwrite it. This is pretty straight-forward. This is the one that you want to set to keep your template from being overwritten. To make a file Read-Only, right click on the filename or icon, choose Properties. At the bottom of this dialog click the box in front of Read-only and click OK. You will not be able to overwrite it now.

Hidden:
This one is pretty self-explanatory as well; if the file is marked hidden then under normal circumstances it is hidden from view. By default, Windows is installed set to hide these files. To change this setting so that hidden files can be seen, click My Computer, Tools, Folder Options, the View tab and click the dot in front of "Show hidden files and folders". Just what the real value of hidden files and folders may be escapes me unless one just wants to hide them from themselves.

System:
This flag is used to tag important files that are used by the system and should not be altered or removed from the disk. In essence, this is like a "more serious" read-only flag and is for the most part treated in this manner. The use of this attribute has been somewhat arbitrary in the different versions of Windows. At one time it probably served a good purpose, but in today's Windows, it has little real use value. 

Archive:
This attribute is probably the most used, and the most valuable of them all. This is a special bit that is used as a "communications link" between software applications that modify files, and those that are used for backup.

YOU DO BACK UP FREQUENTLY, DON'T YOU???

Backup software allows the user to do an incremental backup, which only selects for backup any files that have changed since the last backup. This attribute bit is used for this purpose.

When the backup software backs up ("archives") the file, it clears the archive bit (makes it zero). Any software that modifies the file subsequently, sets the archive bit (makes it 1). The next time that the backup software is run, it knows by looking at the archive bits which files have been modified, and therefore which need to be backed up. This bit is set when the file is opened then closed for any reason even if no changes were made.

Windows Explorer can display the file attributes of each file. Open any folder that contains files. Click View, and choose Details. In any blank space in the header row, right click and select attributes from the list of many possible columns that you can display. A new column will display with the attributes of the files and folders. They can be none, R, H, S, A, or any combination of these.

Click HERE to view or download as a Microsoft Word document

Disclaimer:

The materials in this site are provided "as is" and without warranties of any kind, either express or implied. To the fullest extent permissible pursuant to applicable law, I disclaim all warranties, express or implied, including, but not limited to, implied warranties of merchantability and fitness for a particular purpose. I do not warrant that the functions contained in the materials on this site will be uninterrupted or error-free, that defects will be corrected, or that any site or the servers that make such materials available are free of viruses, spyware, adware, or other harmful components, although all efforts have been made to assure that they are. I do not warrant or make any representations regarding the use or the results of the use of the materials on this site in terms of their correctness, accuracy, reliability, or otherwise. You assume the entire cost of all necessary servicing, repair, or correction. Applicable law may not allow the exclusion of implied warranties, so the above exclusion may not apply to you.