Robocopy Destination Naming Confusion

Page 1 of 3 123 LastLast
  1.    23 Sep 2018 #1

    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 ComputerSystem Spec

  2. essenbe's Avatar
    Posts : 11,481
    Windows 10 Pro and Windows 10 Pro Insider
       23 Sep 2018 #2

    @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 ComputersSystem Spec

  3. essenbe's Avatar
    Posts : 11,481
    Windows 10 Pro and Windows 10 Pro Insider
       24 Sep 2018 #3

    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 ComputersSystem Spec

  4.    24 Sep 2018 #4

    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 ComputerSystem Spec

  5. essenbe's Avatar
    Posts : 11,481
    Windows 10 Pro and Windows 10 Pro Insider
       24 Sep 2018 #5

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

  6. Ztruker's Avatar
    Posts : 6,605
    Windows 10 Pro X64 1809 17763.134
       24 Sep 2018 #6

    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 ComputersSystem Spec

  7. pepanee's Avatar
    Posts : 1,111
    Windows 10 Professional
       25 Sep 2018 #7

    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:
    Click image for larger version. 

Name:	FastCopy.png 
Views:	33 
Size:	12.1 KB 
ID:	205509
      My ComputerSystem Spec

  8.    25 Sep 2018 #8

    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 !!!).

    Click image for larger version. 

Name:	xtree.png 
Views:	0 
Size:	41.7 KB 
ID:	205518

      My ComputerSystem Spec

  9.    25 Sep 2018 #9

    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 ComputerSystem Spec

  10.    25 Sep 2018 #10

    mikeincousa said: View Post
    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: View Post
    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 ComputerSystem Spec

Page 1 of 3 123 LastLast

Related Threads
Over the years, I've come across dozens of ways to properly(?) name a file. For example, as in my movie, here are just a few: The_Secret_of_NIMH_1982 The-Secret-of-NIMH-1982 The.Secret.of.NIMH.1982 The Secret of NIMH_(1982) I think some of...
I have a very strange problem - I have a script that's been running for years on other windows, using the 8dot3 convention. Both the directory and the file name have ~ in them. It finds the directory ok, but can't find the file, even though it...
I'm running KODI on my XBOX and if I select an Artist, and click play, it plays all the track 1's of each album then all the track 2's etc. What I want is for it to play each album by track number. In the past I would edit the Track naming...
Hello all, Annoying problem : I have multiple MFC printer/scanners in my office. Some are identical units; for instance, Brother MFC 2700s. When adding the MFCs onto the local workstations for users, the printer adds are fairly straightforward...
Cannot Change Destination of Apps in Software and Apps
Currently I cannot change the destination of new apps that I download on to my computer. The box that says "New apps will save to" is greyed out. This is a brand new computer. Please help!
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 04:38.
Find Us