[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: Archive bit on directories
- Subject: Re: Archive bit on directories
- From: "Martin J. Osborne" osborne@xxxxxxxx
- Date: Sun, 16 Dec 2007 21:19:52 -0500
Thanks, Harry. As I understand the documentation, /K pertains to the
read-only bit, not the archive bit. But I didn't realise /D can be used
without an argument. I'll have to think about whether it would catch
all the files I want to copy (seems that it would).
Martin
Harry Binswanger wrote:
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
--
Martin J. Osborne
http://www.economics.utoronto.ca/osborne
Have you seen
http://econtheory.org