Robocopy cannot access files when adding read only attribute

0

I am trying to copy files with robocopy and at the same time add read-only attributes and compressed attributes with the A+:RC flag.

This doesn't seem to work. At least I am getting a ERROR 5 (0x00000005).

It is almost as if robocopy first sets the file to read-only and then tries to set the compressed attribute 🤣 I really hope that is not how it works 😂

I tried to change from A+:RC to A+:CR. No effect... Also tried CMD as admin. No avail.

Am I missing something?

C:\Windows\system32>robocopy C:\Windows\Fonts C:\dest /E /a+:rc

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows
-------------------------------------------------------------------------------

  Started : torsdag 30. april 2020 12:40:08
   Source : C:\Windows\Fonts\
     Dest : C:\dest\

    Files : *.*

  Options : *.* /S /E /DCOPY:DA /COPY:DAT /A+:RC /R:1000000 /W:30

------------------------------------------------------------------------------

          New Dir        547    C:\Windows\Fonts\
100%        New File               10976        8514fix.fon
2020/04/30 12:40:08 ERROR 5 (0x00000005) Changing File Attributes C:\Windows\Fonts\8514fix.fon
Access is denied.
Waiting 30 seconds...
robocopy
asked on Stack Overflow Apr 30, 2020 by Arete

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0