Using RoboCopy

Page 2 of 2 FirstFirst 12

  1. Posts : 9
    Windows 10 Pro
       #11

    Try3 said:
    What do you mean by

    ?

    The RoboCopy syntax is given in post #6.

    Denis
    I mean there are a series of .mp4 original file that I have encoded to a lower resolution saving the new videos into a folder called "encoded" without changing the filename.

    e.g.
    C:\original\PXL_20210513_111045037.mp4 (1.26GB with created date 13/05/2021)
    C:\encoded\PXL_20210513_111045037.mp4 (223MB with created date 06/10/2022)
    I would to give to the encoded videos the same created date of the originals.

    So I have understood to have to use /dcopy:D, but how may I run it for all the files?
      My Computer


  2. Posts : 16,952
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #12

    RoboCopy does not have that capability.

    One of my audio utilities has a setting to preserve the original date despite the changes that are being made. Perhaps your video editor has the same capability?

    Otherwise, you'll have to learn enough PowerShell scripting [or vbs] to read the date created of one file then write that to the properties of another file.
    That's a lot of work just for one requirement.
    Unless you are going to need to do this a frequently, it might well be better to install SKTimeStamp then, with both your source & destination folders open in File explorer windows so you can see both file lists at the same time, to manually read the created date of one file & use SKTimeStamp to manually set the date created of another.


    Best of luck,
    And thanks for the rep,
    Denis
      My Computer


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #13

    Hello @Kerpert and @JamesJoey,

    When I first investigated creating a backup strategy [ Specific Folders ], apart from creating a System Image, I noticed that there were several different options available to me. Therefore, I have posted these different options for you in case they may help you too.

    The different options available to me were XCopy, RoboCopy, TeraCopy, and even CMD Prompt?

    Of course, it all depends on what you specifically want to do. I ended up using RoboCopy because it suits my needs.

    Here are just a few links that you might find informative and useful . . .



    > XCopy - DocsMicrosoft
    > XCopy - TechRepublic
    > XCopy - SS64



    > RoboCopy - DocsMicrosoft
    > RoboCopy - TechRepublic
    > RoboCopy - SS64

    NOTE:- To view RoboCopy Commands in a CMD Prompt, type robocopy /? and press Enter.

    To output the Commands to a .txt file, type robocopy /? > %UserProfile%\Desktop\RoboCopy.txt. Obviously change the output Path to your own.



    > TeraCopy - CodeSector
    > TeraCopy - Copying and Verifying Files - CodeSector

    I have NOT personally used TeraCopy.



    > CMD Prompt - Copy - DocsMicrosoft
    > CMD Prompt - How to Copy Files in CMD Prompt - WikiHow



    I hope this helps.
    Last edited by Paul Black; 11 Oct 2022 at 03:16.
      My Computer


  4. Posts : 4,187
    Windows 11 Pro, 22H2
       #14

    You can copy timestamps by using the /COPY:copyflag[s] syntax. The default is /COPY:DAT (Data, Attributes, and Timestamps).

    NOTE: If your goal is to duplicate the source directory to the destination, use this syntax:

    ROBOCOPY source_folder destination_folder /MIR

    The "/MIR" mirrors the source to the destination. Note that in addition to copying files and folders from the source to the destination, it will DELETE anything that is located in the destination but not present in the source. In other words, when done running, the destination will be an exact mirror of the source including the same attributes and timestamps as the source.
      My Computers


  5. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #15

    Hello @JamesJoey,

    Try3 said:
    ROBOCOPY "d:\datafiles" "e:\databackup" /E /XA:H /MIR /DCOPY:T /MT /R:10
    I was interested in the command [ ... /E /XA:H /MIR /DCOPY:T /MT /R:10 ] that Denis posted, so I broke it down for you . . .

    Code:
    
    /E                       - Copy Subdirectories, including Empty ones.
    /XA:[H = Hidden]         - eXclude files with any of the given Attributes set.
    /MIR                     - MIRror a directory tree ( Equivalent to /E plus /PURGE ).
    /DCOPY:[T = Timestamps ] - What to COPY for directories.
                               ( Default is /DCOPY:DA > D=Data, A=Attributes, T=Timestamps ).
    /MT                      - Do Multi-Threaded copies with n threads ( Default is 8 ).
    /R:[10]                  - Number of Retries on failed copies ( Default is 1 Million ).
    

    It was more for curiosity than anything !
      My Computer


  6. Posts : 16,952
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #16

    Kerpert wants to set the date of one file to that of another file- post #11.
    It has nothing to do with RoboCopy.

    Denis
      My Computer


  7. Posts : 4,187
    Windows 11 Pro, 22H2
       #17

    Try3 said:
    Kerpert wants to set the date of one file to that of another file- post #11.
    It has nothing to do with RoboCopy.

    Denis
    Denis, thanks for the clarification. I was misunderstanding the goal.
      My Computers


  8. Posts : 9
    Windows 10 Pro
       #18

    FYI
    I did my task using "bulkfilechanger" from Nirsoft.
      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 13:24.
Find Us




Windows 10 Forums