Here's our Windows XP Tip for.. April 5, 2004
Click Here to see a complete list of all of our previously released Tips!
Keep It Safe
When you use Xcopy at the Command Prompt to copy a group of files, all read-only attributes are reset by default. If you need to make sure you keep all your files' read-only attribute set, type

xcopy (whatever) /k

and press Enter.

If you'd like to check this, open the Command Prompt window and type

copy con test.bin

and press Enter. Now enter

xxx

and press Enter. Next, press F6 and press Enter.

Now type

attrib +r test.bin

and press Enter. To make sure the read-only attribute is set, type

attrib test.bin

and press Enter. You should see the "r" that indicates a read-only file. Next, insert a floppy disk into Drive A and type

xcopy test.bin a:

Press Enter to make the copy. If you type

attrib a:\test.bin

and press Enter, you'll find that the read-only attribute is missing. But if you use

xcopy text.bin a: /k

and press Enter, the attribute will remain as you can see by typing

attrib a:\test.bin

again.