none
Question about Robocopy RRS feed

  • Question

  • Hello,

    I have just begun to read the robocopy.doc included with the admin tool kit that includes robocopy, but if anyone can answer this it would be helpful.

    Is there a way I can tell robocopy to not overwrite the file with the same name and instead append a number to it?

    i.e.:
    copy user1\meeting.doc to user2\meeting.doc
    rename user1\meeting.doc to meeting(1).doc so user2 has meeting.doc and meeting(1).doc

    Is this possible?

    Thanks,

    Lynne

     

    Thursday, July 15, 2010 3:03 PM

Answers

  • >>>Is there a way I can tell robocopy to not overwrite the file with the same name and instead append a number to it?

    For roboocpy No, not for indidual files....at least i can't find a way to do it.

    However, you can do this with the copy command, by doing a  rename on the copy (ie. copy to new name), not afterwards.  In your example do this.

    copy user1\meeting.doc user2\meeting(1).doc

    Robocopy could be used to copy entire folder structures to subfolders labeled by numers or dates, etc.

    robocopy C:\user1\ C:\user2\folder1 *.*

    Thursday, July 15, 2010 6:10 PM

All replies

  • >>>Is there a way I can tell robocopy to not overwrite the file with the same name and instead append a number to it?

    For roboocpy No, not for indidual files....at least i can't find a way to do it.

    However, you can do this with the copy command, by doing a  rename on the copy (ie. copy to new name), not afterwards.  In your example do this.

    copy user1\meeting.doc user2\meeting(1).doc

    Robocopy could be used to copy entire folder structures to subfolders labeled by numers or dates, etc.

    robocopy C:\user1\ C:\user2\folder1 *.*

    Thursday, July 15, 2010 6:10 PM
  • Is it available to do this with 2 steps --- copy files exclude files with same name (and maybe output a log to show the files which are skipped), then copy the left files again (maybe manually so that you can choose "copy but keep both files")

     


    Shaon Shan| TechNet Subscriber Support in forum| If you have any feedback on our support, please contact tngfb@microsoft.com
    Friday, July 16, 2010 8:29 AM
    Moderator