How do I copy/move files WITHOUT retaining/preserving the security/sharing permissions?

I'm trying to copy/move files from one hard drive to another hard drive but I do not want the security/sharing permissions to be copied over with the files; instead I want it to use generic/default permissions.

How do I achieve this?

2 Answers

The easiest is using robocopy with the right arguments. Robocopy is a robust copy program where you can specifically tell it how to copy the files. It would suit you using it like:

robocopy c:/source c:/destination /e

The "/e" parameter tells it to copy all subfolders and files. As there's no specification on how to copy, it'll only copy the files, no permissions or attributes.

To copy a single file:

robocopy c:/source c:/destination file.exe

Source:

1

To get around the "Permission Denied Error 5" and ONLY copy the file without any other attributes use:

robocopy c:/source d:/destination *.* /COPY:D

/Copy:D means only copy data.

:D - Data
:A - Attributes
:T - TimeStamps
:S - Security
:O - Owner
:U - aUditing information

So:

robocopy c:/source d:/destination *.* /COPY:DATSOU

will copy Data, Attributes, Timestamps, Security, Owner, aUditing Info - Which is the same as /COPYALL

/COPY:copyflag[s] :: what to COPY (default is /COPY:DAT). (copyflags : D=Data, A=Attributes, T=Timestamps). (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like