[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Archive bit on directories



Martin wrote:
I've recently switched from 98 to XP and have noticed that the archive bits on some of my directories keep getting re-set. I've just diagnosed the problem: xcopy between directories sets the archive bit on the target directory (though xcopy for a specific file does not). Maybe this is well known, though I couldn't find it in the archives. (I regularly transfer files between two computers via a portable HD using
xcopy e:\xy c:\xy\ /M/Y/S
to get the files from the portable drive.)

Is it a problem with your switches? XCOPY /? says:
"/M Copies only files with the archive attribute set, turns off the archive attribute."
I wonder if what it really does is *toggles* the archive attribute, and
that would work fine for copy files, but not directories.

Note also:
 /K      Copies attributes. Normal Xcopy will reset read-only attributes.

I wonder if this syntax is supported: /-K
since they do support: /-Y
At any rate, I'd recommend using XCOPY as I do: ignore attributes and go by file date.

xcopy c:\*.* /c /e /f /d /y E:\

(if E: is your other drive).


Harry Binswanger
hb@xxxxxxxx