The /SEC or /COPYALL will grant file permission. This happens when file as has different permission and you want the file to have same permission in a copied directory.
#it is always good to write the output to a log file for review. This is important when you have an error and would like to review.
You do this by including /SEC or /COPYALL at the end of lines of code.
Another tip is to start the CMD console as an administrator and the error would go away.
Another important tip is when you have spaces in the path, make sure you wrap the path in "path" and escape character like this:
Instead of c:/foler do this instead, c://folder because it is an absolute path, the system would read a path different from code. make sure you research about absolute paths.