logo

Home page
Articles for Windows, Linux, OS X
Mac tips and articles
Mac tips
Windows 8 tips and articles
Windows 7 tips and articles
Vista Tips
XP Tips
Linux tips and articles
Read the blog
Online store
Windows, Linux, OS X programs
Links
About

Windows XP hints and tips

Back to tips index

Make files read-only

Files and folders have attributes associated with them that control what you are allowed to do with them and you can make a file read-only, which means that anyone can open the file and view it, but they can't change it.

Well, to be specific, you can't save any changes you make because the file is read-only. It's a handy way to protect valuable files from being accidentally changed or deleted - a warning is displayed if you try to delete a read-only file.

To make a file read-only, right click it in an Explorer window and then select Properties from the menu that is displayed. Tick the Read-only box near the bottom of the dialog.

Make files hidden

If you read the last tip and have changed a file or folder's attributes to read-only you will have noticed a Hidden option next to Read-only. Tick this option and a file is hidden from view. It's actually only hidden from the normal Explorer view, but it is still useful for hiding files and folders from other users of your computer, such as children. You don't want them mucking up your accounts, for example. You can make hidden files visible in any Explorer window by selecting Tools, Folder Options. Click the View tab and then select Show hidden files and folders. (The default setting is Do not show hidden files and folders.)

Make files system

There is another attribute associated with files and folders called System. Windows sets this attribute on certain files, such as Desktop.ini that is used to store the settings of folders you customise. (See the previous tip on customising folders.) When you try to delete or move a System file, Windows displays a warning. Unfortunately, you can't set the System attribute in Windows, at least not without a specially written utility. However, it's easy to do from the command line (Dos) prompt. Click Start, Run and enter cmd to open a command prompt window. Enter:

attrib +s c:\folder\file

changing c:\folder\file to the path of the file or folder you want to change. To turn off the System attribute, use -s instead of +s. To close a command prompt window, type exit.

Entering path names at the command prompt

The problem with the last tip is that it's not easy entering the path to a file or folder at the command prompt. Just where is the My Documents folder? Even if you know, try typing the path to a file in it without making a mistake. It's not easy. However, there's a shortcut to entering paths at the command prompt. Suppose we want to use the attrib command as shown above. We would type:

attrib +s

and then open an Explorer window and find the file or folder. Now click and drag the file or folder from the Explorer window and drop it on the command prompt window. As if by magic, the full path is entered. It works with any command. Want to change to the Program Files folder? Enter CD then click and drag the Program Files folder from an Explorer window to the command prompt window and drop it. Hit Return and you're there.

Use attributes when searching

Why are we talking about old Dos commands like attrib? Well, it's actually quite useful. If you use the Windows Search facility (click Start, Search), it will search the contents of all files and folders, including zip archives. If you have a lot of zips on the disk, Search takes a very long time to work because it has to open each zip and examine the contents. If you know what you are looking for isn't in a zip, use attrib to set the Hidden attribute on all your zips, then use Search. It will be much faster. You can unhide the zips afterwards. To hide all the zips on the hard disk, click Start, Run and enter cmd. At the command prompt, enter:

attrib +h c:\*.zip /s

The +h sets the Hidden attribute and the /s tells it to look in all subfolders. Now you can use the Search facility on the Start menu. To unhide all your zips, type the same command, but this time use -h instead of +h. Type exit to close a command prompt window.

Back to tips index


copyright