Robocopy syntax doesn't work in my batch file anymore

Page 3 of 4 FirstFirst 1234 LastLast

  1. Posts : 5,478
    2004
       #21

    phrab said:
    I guess it works somewhat differently in WinXP.
    Hard to say - I was born in the 80's.

    Whether robocopy worked at that time I'd have to google (assuming Google predated XP which I don't know).

    I know my own little peeve with it (the 100%100%100% in the log file) isn't fixed in the last 20 years.
      My Computer


  2. Posts : 2,450
    Windows 10 Pro x64
       #22

    phrab said:
    For what it's worth, I used Robocopy on my 2nd machine, a WinXP SP-3 machine. When I tried to create a logfile, the /DCOPY:T switch prevented the logfile from being created...even if I made it /DCOPY:TDA. I guess it works somewhat differently in WinXP.
    Are you using the /MT switch?
    Mind you that this switch was introduced in Win7, long later WinXP
      My Computer


  3. Posts : 2,450
    Windows 10 Pro x64
       #23

    lx07 said:
    Hard to say - I was born in the 80's.

    Whether robocopy worked at that time I'd have to google (assuming Google predated XP which I don't know).

    I know my own little peeve with it (the 100%100%100% in the log file) isn't fixed in the last 20 years.
    To avoid the 100%100%100% in the log file, use the:
    /NP switch (No Progress - don't display percentage copied.)

    I'm using /TEE /NP /FP /NDL /BYTES and the log file is OK.
      My Computer


  4. Posts : 5,478
    2004
       #24

    Thank you. It was really bugging me that.
      My Computer


  5. Posts : 2,450
    Windows 10 Pro x64
       #25

    lx07 said:
    Thank you. It was really bugging me that.
    You're very welcome. Glad I could help! :)
      My Computer


  6. Posts : 943
    windows 10 professional 64-bit, 22H2
    Thread Starter
       #26

    ddelo said:
    Are you using the /MT switch?
    Mind you that this switch was introduced in Win7, long later WinXP
    Sorry...I missed this. No, I'm not using the /MT switch. However, I put the /DCOPY:T with the other switches before the /LOG:\backups\etc.. When I put the switch after /LOG:\backups\etc., it seems to work. So I guess I goofed. I'll see if it works tomorrow.
      My Computers


  7. Posts : 943
    windows 10 professional 64-bit, 22H2
    Thread Starter
       #27

    ddelo said:
    1. The /DCOPY:T switch copies the timestamp of each copied directory (= folder). The D,A are not needed as they are copied by the /MIR switch.
    I just put the /DCOPY:T switch at the end (on my Win10 machine). The log file was created, BUT when I opened it, I got this message on 2 of the log files:
    "Copying NTFS Security to Destination Directory D:\backups\FolderName\This security ID may not be assigned as the owner of this object."
    Not sure what's going on.
      My Computers


  8. Posts : 2,450
    Windows 10 Pro x64
       #28

    phrab said:
    I just put the /DCOPY:T switch at the end (on my Win10 machine). The log file was created, BUT when I opened it, I got this message on 2 of the log files:
    "Copying NTFS Security to Destination Directory D:\backups\FolderName\This security ID may not be assigned as the owner of this object."
    Not sure what's going on.

    It seems that the destination file permissions cannot be set by your account.

    I would suggest two options:
    1. Check this: This security ID may not be assigned as the owner of this object. or
    2. Add the /B switch (to run in Backup mode)
      My Computer


  9. Posts : 943
    windows 10 professional 64-bit, 22H2
    Thread Starter
       #29

    ddelo said:
    It seems that the destination file permissions cannot be set by your account.
    2. Add the /B switch (to run in Backup mode)
    Thank you for your reply. When I did this manually, I got this message:
    ERROR : You do not have the Backup and Restore Files user rights.***** You need these to perform Backup copies (/B or /ZB).ERROR : Robocopy ran out of memory, exiting.ERROR : Invalid Parameter #%d : "%s"ERROR : Invalid Job File, Line #%d :"%s" Started : %s %s

    However, the Task Scheduler, which is checked to run with highest permissions, worked fine. When I ran it directly, I got the error message. If I run it as an administrator, it works fine. I guess I didn't give myself enough permissions as a user/administrator.
      My Computers


  10. Posts : 2,450
    Windows 10 Pro x64
       #30

    The ERROR : You do not have the Backup and Restore Files user rights, is because your didn't run the command, with the /B switch, as ADMINISTRATOR.

    As a general rule, to avoid problems, RoboCopy commands should always be run as ADMIN. So either run the batch file as ADMIN or run the command from an elevated (Run As Admin) command prompt.
      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 07:24.
Find Us




Windows 10 Forums