Robocopy Destination Naming Confusion  

Page 2 of 3 FirstFirst 123 LastLast

  1. Posts : 323
    windows 10
    Thread Starter

    I should have mentioned that the time / date stamps are critically important.

    That is why I am using Robocopy.
      My Computer

  2. Posts : 5,478

    You are making it too hard for yourself énd overthinking it I think (unless I misunderstand your requirement)

    On PC1 copy with /E to backup drive Z.
    On PC2 copy with /E to backup drive Z.

    Backup drive Z will then have latest version from both but also contain files from PC1 or PC2 that don't exist on the other.

    If you want to replicate deletions using /MIR you can but it could get confusing if you aren't sure which source is primary.
      My Computer

  3. Posts : 7,868
    windows 10

    Download the free GUI for robocopy that writes the CMD for you so you know it's right
      My Computer

  4. Posts : 5,478

    Samuria said:
    Download the free GUI for robocopy that writes the CMD for you so you know it's right
    I disagree, he must decide the requirement first - he knows the syntax already. What is important is deciding what is copied where in what conditions.
      My Computer

  5. Posts : 14,021
    Windows 11 Pro X64 22H2 22621.1848

    What you describe is what I use MirrorFolder for? It's not free but it sure does a great job of keeping disparate files and folders in sync across multiple drives and across multiple PCs. I've been using it for many years.

    A single computer license for MirrorFolder costs US $39.00
      My Computers

  6. Posts : 323
    windows 10
    Thread Starter

    Revised command

    Thank you again for for your sage comments and suggestions and patience lx07.

    Granted I do have a strong tendency to "overthink" some times. That springs from my desire for high levels of precision and wanting to "look before one leaps" and a lack of skills for intuitively being able to fill in blanks in very unfamiliar complex discourse -- such as Microsoft documentation.

    I see your point withe the /E switch. I think I dismissed it from the start because there is no explicit mention of how it handles time / date stamps. Maybe I missed that in all the murk? Again these are critical pieces of information from the source file. I now vaguely recall your earlier comments that prompting me to clean up the redundancy in my base command.

    The following provided some insights, but still strikes me as not fully definitive with respect to the time/ date stamps.

    robocopy | Microsoft Docs

    1. /ts Includes source file time stamps in the output.

    This led me / leads me to think that time/ date data is not included by default?
    In my early loops that is why I tuned to explicitly specifying preservation of them by specifying
    :/MIR /COPY:DAT”

    So if I understand you right now Robocopy natively preserves time / date data unless told to not do so?

    2./e Copies subdirectories. Note that this option includes empty directories. For additional information, see Remarks.

    • The /mir option is equivalent to the /e plus /purge options with one small difference in behavior:
      • With the /e plus /purge options, if the destination directory exists, the destination directory security settings are not overwritten.
      • With the /mir option, if the destination directory exists, the destination directory security settings are overwritten.

    # So if I have all of this right finally first establishing an empty destination folder then using the /e switch as below will properly name the destination directory with preservation of the time / date and other data

    Recasting my base command.

    J:\HP.Files /E /XD
    /v /tee /ts /log:"I:\log.HP.temp.txt"

    Last in passing.

    From Robocopy /?

    #I am unable to decode this but it seems to speak to the issue of naming the destination with “Directory.”?

    : Remarks :
    Using /PURGE or /MIR on the root directory of the volume formerly caused
    robocopy to apply the requested operation on files inside the System
    Volume Information directory as well.

    This is no longer the case; if either is specified, robocopy will skip any files or directories with that name in the top-level source and destination directories of the copy session.
      My Computer

  7. Posts : 323
    windows 10
    Thread Starter

    New Vexation With Robocopy and Documents

    I thought I had this figured out, but I was wrong.

    Robocopy did not like the punctuation in the directory name. Part was the period. Part was an error on my part, picking up a trailing space when I copied the directory name from the command.

    With those cleared the command nicely put all the HP Files in the the HPFiles destination directory. / E and /MIR both did the job.

    I unmounted the destination folder and went elsewhere.

    Then I came back and clicked on the HPFiles folder.

    It immediately change to "Documents."

    Same as before. Shows in the file tree and Properties, but not in the delete tool.

    Any new suggestions?
      My Computer

  8. Posts : 12,793
    Windows 11 Pro

    Are you sure that Documents is not a subfolder of the HP Files folder?
      My Computer

  9. Posts : 323
    windows 10
    Thread Starter

    I am mirroring to an external drive, not the HP.

    Now after all this I think that "Documents" is "hard coded."
    Suspect what is needed is a way to intervene in that structure?

    Or find a way to recursively march through the file tree one step down from "Documents:?

    Or figure out a way to mirror the files without Robocopy?

    Take the project to Linux as one participant here suggested?

    Now open to any and all fixes or alternates, with the easier one taking priority.
    Last edited by mikeincousa; 27 Sep 2018 at 08:15.
      My Computer

  10. Posts : 5,478

    mikeincousa said:
    Or figure out a way to mirror the files without Robocopy?
    This is the bit that confuses me.

    Are you sure you want to mirror? That would mean that if you deleted something from source it would be deleted from the destination. As I read your earlier post you wanted the backup not to have stuff deleted in case you deleted stuff from source by mistake.

    In any case there is no advantage or disadvantage using robocopy compared to rsync really that I can think of. Either will take the latest version of a file (or directory) and replace the one that is there. I run Windows, Linux and MacOS and use robocopy on Windows because it works fine.

    What I'd do (and what I do do) though is not copy "Documents" as the old hard links confuse it. Easier to make a batch file that says explicitly what you want to copy from point A to point B.
      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 04:42.
Find Us

Windows 10 Forums