4

If I use robocopy to copy encrypted files to a shared folder that does not support encryption, it fails with a

The specified file could not be encrypted.

This happens with or without the /EFSRAW flag.

Is there an equivalent for robocopy of the /G flag of xcopy that allows copying encrypted files to an unencrypted folder?

user209974
  • 141
  • 1
  • 3
  • 1
    @harrymc *Not* a duplicate, I am asking specifically about `robocopy`, which is not mentioned in the other Q&A – user209974 Feb 14 '19 at 15:24
  • But there is no solution with robocopy. You need to locally copy the files with EFS, unencrypt them, and then move to the shared folder. – harrymc Feb 14 '19 at 15:47
  • Maybe you can explore using a file system for the share that is compatible with EFS if the reader of the data once transferred is also expected to be able to decrypt it using EFS. If there is a require for encryption in transit and decrypting before transmitting is not an option, perhaps you need another file-level technology that is compatible across the source and destination file system such as PGP, Zip 256 bit AES, etc.? Depending on your requirements if any are applicable will depend on an ultimate solution your the end goal of your task. – Vomit IT - Chunky Mess Style Feb 14 '19 at 16:22
  • 1
    @harrymc Ok thanks. It feels a bit awkward that `robocopy` is less capable than `xcopy` (or even plain `copy`) in that regard. – user209974 Feb 15 '19 at 08:46
  • Robocopy uses the wrong Windows API for doing what you are asking for. Possibly some third-party product may do it better, but I don't know of one. – harrymc Feb 15 '19 at 09:51

1 Answers1

0

You only get an error if the source folder is also encrypted and the destination folder is a root directory./nodcopy flag seems to work in this case, although the file is created with system hidden attributes.

Ult
  • 1
  • 1