How to keep file attributes by using Copyfile in Matlab
Show older comments
Hello everyone,
I have a small question on how you preserve file attributes, when you use copyfile(source, destination)? By doing so, I take over the ownership, which I do not want. I just want to copy them to another folder ''Archive''.
Thank you in advance Pedram
Accepted Answer
More Answers (1)
Pedram Arabschahi
on 18 Jul 2017
0 votes
3 Comments
Guillaume
on 18 Jul 2017
Please use Comment on this Answer rather than starting a new answer.
If you use the /copyall flag, equivalent to /copy:DATSOU, the ownership should be preserved. That's what the O flag should do.
Pedram Arabschahi
on 19 Jul 2017
Guillaume
on 19 Jul 2017
Well, yes, without administrative rights, robocopy, or any other program for that matter, will not let you impersonate another user which is required when creating a file with a different ownership than yours.
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!