Robocopy Destination Naming Confusion  

Page 1 of 3 123 LastLast

  1. Posts : 323
    windows 10

    Robocopy Destination Naming Confusion

    My command is:
    ROBOCOPY C:\Users\mikei\Documents J:\HP.Files /MIR /XD "C:\Users\mikei\Documents\FeedbackHub" "C:\Users\mikei\Documents\Cyberlink" /v /tee /ts /log:"I:\log.HP.temp.txt"
    Have I made an error again?

    Earlier I tried to run a similar command as User.

    It produced a destination file named “Documents”.

    So I tried again as PS C:\WINDOWS\system32>
    I got the same results on the destination side. “Documents.”

    Thinking I had missed something I went to delete the destination “Documents” folder and try again.

    At..Aare you sure you want to delete... the prompt showed the correct folder name "HP.Files."

    So why is W10 changing my specified destination name in the properties and destination, and keeping it for the delete operation?

    I still had the first User run on a different drive. Same problem: a conflict between the destination displayed name and the Properties name, and the name in the delete operation.

    How can I get the right name to appear in the destination?

    Everything else beside the name seems to working okay.

    Thanks for any thoughts and suggestions.

      My Computer

  2. Posts : 12,793
    Windows 11 Pro

    @mikeincousa I'm not sure I am the correct person to help. I use robocopy as well, although I have never tried running it from powershell. I always run it from an elevated command prompt.

    From reading your commands, I am not sure what you are trying to do. It looks like you are trying to run 2 robocopy commands at the same time and the second one is a subfolder of the first command.

    First you are copying the contents of C:\Users\mikei\Documents to J:\HP.Files which should copy your entire documents folder to J:\HP.Files

    Next, it seems, you are trying to copy C:\Users\mikei\Documents\FeedbackHub which is a subfolder of your Documents, which you just copied to C:\Users\mikei\Documents\Cyberlink which is also a subfolder of your documents folder as well. I'm rather confused as to exactly what you are trying to do, unless you are trying to exclude those 2 directories.

    I do not claim to be a robocopy expert, but I am not sure you can run multiple commands from 1 command or .bat file and in the second part of the command I don't believe the quotations are required.

    Create a folder on J named HPFiles without the . Then, from an elevated command prompt, run ROBOCOPY C:\Users\mikei\Documents J:\HPFiles /MIR /XD

    This is a good resource which may help you. Even though it is from Sevenforums it works exactly the same in Windows 10 ROBOCOPY - Create Backup Script - Windows 7 Help Forums
    Last edited by essenbe; 23 Sep 2018 at 22:33.
      My Computer

  3. Posts : 12,793
    Windows 11 Pro

    Also, you are transferring a folder named Documents from your C:/users to HP.Files, so in the folder HP.Files it is going to create a folder named Documents which should contain all of the contents of your Documents folder. I hope I explained that right. Does that help you any?
      My Computer

  4. Posts : 323
    windows 10
    Thread Starter

    Yes. The embedded commands are for skipping those folders.

    I will try what you suggest, preset the destination and drop the punctuation.

    I am curious to see what happens to the "Properties".

    FYI. I have mirrored many folders with that syntax, but something is different with "Documents".
      My Computer

  5. Posts : 12,793
    Windows 11 Pro

    I believe you. Like I told you, I use it but am far from an expert at it.
      My Computer

  6. Posts : 14,018
    Windows 11 Pro X64 22H2 22621.1848

    They are exclusions.

    /XD dirs [dirs]... :: eXclude Directories matching given names/paths

    There are Junctions/Hard links under Documents

    My Music
    My Pictures
    My Videos

    Maybe thay are causing problems?

    Also, as essenbe mentioned, run it under an Elevated Command prompt instead of Powershell, see what you get.
      My Computers

  7. Posts : 2,819
    Windows 10 Pro for the Bro

    I use a program with a GUI (Graphical User Interface) that does the same thing as RoboCopy. It's called FastCopy

    If you go to the link, look at the picture at the right.
    You got a Source folder, a Destination folder, and a drop down list that let's you copy and overwrite, or copy and only copy over the different items, etc...

    Yet here are the options that I have to save data from one folder to another:
    Robocopy Destination Naming Confusion-fastcopy.png
      My Computer

  8. Posts : 11,247
    Windows / Linux : Arch Linux

    Hi there

    Warning - not really for noobs but those who have or want a bit of experience with Linux can have a go with this as it's incredibly useful.

    the easiest way by far to do this is actually via a Linux system - if you have a Linux NAS then you are almost there already.

    1) get any Linux distro with a GUI - a VM works well as does a Live distro too - install GRSYNC, NTFS-3G (to read ntfs file -usually installed by default) and SAMBA on it. (GRSYNC is the GUI version of RSYNC which is used a lot for Linux copies / backups etc).

    2) On the Linux system mount the Windows directories / disks you want to "Robocopy"

    3) start the GRSYNC program on the Linux system -- selecting the mounted windows directories

    Works an absolute treat -- even does things like directory recursion, selective copies, update newer only etc.

    You need some knowledge to go down this route but believe me the learning pain is well worth the end reward.

    I know this is a bit of a radical solution but sometimes these things work far better than the seemingly more obvious ways of doing it.

    As an Engineer I always try and find the best tool for the job and when it comes to mucking about with files and directories I've found this method easily the best - I've come to grief loads of times in the past with Robocopy.

    It's a pity the old XTREE from DOS days isn't still around !!! Anybody remember that one. (Dos version but was really good in those days !!!).

    Robocopy Destination Naming Confusion-xtree.png

      My Computer

  9. Posts : 323
    windows 10
    Thread Starter

    1. "Also, as essenbe mentioned, run it under an Elevated Command prompt instead of Powershell, see what you get"

    Am I not already running at the Elevated Command prompt?
    Cut and pasted from my command prompt window.
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    PS C:\WINDOWS\system32>

    This is what I am doing.......
    Take the cursor to the bottom left corner and right-click to open the WinX menu. Select Command Prompt (Admin) to open an elevated command prompt.

    2. I have an older Linux box, but the new Windows machine is much faster and smoother: it has become my main computer for this project. My goal is to very quickly get to a working mirroring back-up scheme with Windows. I know of Rsynch and think it will ultimately be the best tool, but it is complicated and can be challenging (I have been told by a super- competent young fellow). Right now I need to tidy up the WIP.

    3. Think of my project like this. I want to consolidate all my historical files to a single archive drive, and keep copies of my most current ones on that drive. I want to keep up to minute at least once a day, say with a Chron-job style script.

    Right now I am in the last leg of consolation, getting the files from the two Windows HDD's to the Archive drive, then mirroring it.

    I have "Documents" in the new machine: these are the ones that I have been talking about -- and -- I have "Documents" from the old machine drive (now in an enclosure).

    So you can see my quandary: how do I keep the two "Document" mirrors separate?

    I can deal with the old machine current state because it is a one-time transfer. But what if I add as second Windows machine to the mix? Or id I modify this drive and need to up date the mirror?

    Maybe this is beyond Robocopy and Windows?

    I am very reluctant to change tools in midstream. I am not too sharp with all this stuff so it is always a challenge.

    Batch scripting would be helpful, but I have not written one since the exciting arrival of Disk Operating System.

    So if someone could help me start mapping some batch files that out that might the short success path?

    I will have another go at this a bit later today or tonight.
      My Computer

  10. Posts : 5,478

    mikeincousa said:
    Think of my project like this. I want to consolidate all my historical files to a single archive drive, and keep copies of my most current ones on that drive. .
    Use /E not /MIR as /MIR will delete files and directories on backup that no longer exist on source.

    As far as I can understand, you don't want that - you want everything copied to backup and only the latest files replaced rather than deleting directories/files on backup that don't exist on source any more.

    mikeincousa said:
    Maybe this is beyond Robocopy and Windows?
    No, you just need to decide what you want to do - don't mirror if you want to copy one way for example.
      My Computer


  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 16:54.
Find Us

Windows 10 Forums