Results 1 to 3 of 3
  1. #1
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XCopy Prompting (XP)

    I am having a challenge with using XCopy and prompting. The code I am using is as follows:

    XCOPY source [destination] /S /D

    According to XCOPY help the /D:m-d-y Copies files changed on or after the specified date. If no date is given, copies only those files whose source time is newer than the destination time.

    If I take Folder A and it's subdirectories and XCopy them to Folder B and then reverse it: Folder B and it's sibdirectories to Folder A

    I am prompted to "overwrite" the all the files. I don't understand why all files are receiving the prompt. I can certainly understand that if Folder B contains a file not listed in Folder A; it should prompt just for that new file.

    Folder A resides on the hard drive while Folder B is on a thumbdrive.

    Your thoughts are appreciated.
    John

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: XCopy Prompting (XP)

    My thoughts are that I wouldn't use Xcopy!

    I can think of three ways to synchronise two sets of directories:
    1. <LI>ROBOCOPY /MIRror (or XXCOPY), if you are a BATch file enthusiast<LI>SyncToy to mirror (sets of) folders -- I use it for replicating folders between PCs<LI>Karen's Replicator (everyone recommends this but I've never used it!).
    Other people may think of several others.

    That said, if you do<pre> XCOPY folderA*.* folderB /D /S /Y
    XCOPY folderB*.* folderA /D /S /Y</pre>

    where both are test directories, won't that do what you wish? (I know it doesn't really answer your question...)

    John
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  3. #3
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: XCopy Prompting (XP)

    John,

    Thank you for your suggestions. I thought about adding the switch /Y to get around the prompting but as you said it really didn't answer my question. There must be some other type of time stamping going on that would differentiate the same (?) files.

    Anyway I added the switch and it appears that both folders are insysc.

    Regards,
    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •