Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    xcopy without overwriting (Windows xp)

    Is there a way to use xcopy to not overwrite any files that exist in a destination directory without prompting me every time it finds an existing file? Any help would be appreciated. Thank you!. - scott

  2. #2
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: xcopy without overwriting (Windows xp)

    Not sure if this would work but:

    The [/exclude:filename] switch checks for a list of files that should not be over-written. Perhaps you could create a batch file that creates the list:
    <code>dir > exclude.txt </code>
    then run
    <code>xcopy [source] [destination] /exclude:exclude.txt</code>

    See Xcopy Command-Line Switches.

  3. #3
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Cincinnati, Ohio
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: xcopy without overwriting (Windows xp)

    I will try your suggestion. Thank you for your help!

  4. #4
    Plutonium Lounger
    Join Date
    Oct 2001
    Location
    Lexington, Kentucky, USA
    Posts
    12,107
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: xcopy without overwriting (Windows xp)

    I haven't used XCOPY for a long time and maybe I'm not understanding how it works, but doesn't the /Y switch suppress prompting?

    Edited: Wait a sec, maybe that switch forces it to copy all files, which is NOT what you want. Sorry!

  5. #5
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,585
    Thanks
    5
    Thanked 1,059 Times in 928 Posts

    Re: xcopy without overwriting (Windows xp)

    You can also check out XXCOPY, a Versatile File Management Utility --- Boldly Extended Xcopy. There is a <img src=/S/free.gif border=0 alt=free width=30 height=15> for personal use version and a paid 'professional' version.

    Joe
    Joe

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

    Re: xcopy without overwriting (Windows xp)

    On test directories initially, see if REPLACE source target /A does what you want.

    Otherwise, you will have to plough through the multifarious switches of XXCOPY or ROBOCOPY...

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

    Ita, esto, quidcumque...

Posting Permissions

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