How to supress 'Access denied' when copy/replace file in the System folder using Command Prompt

How to suppress 'Access denied' when copy/replace file in the System folder using Command Prompt

I use copy c:\a.txt  d:\  /S  /Y  and get 'Access Denied'
myang999Asked:
Who is Participating?
 
theProfessaConnect With a Mentor Commented:
In this case you do not want to use the copy command but XCOPY

Goto your command prompt and type in

xcopy c:\a.txt d:\ /c

/C parameter is to suppress and error dialog boxes

type xcopy /? to find out more paramters

Hope this helps!
0
 
myang999Author Commented:
I am sorry I have to reopen this. There was typo in my path that's why it worked.

I am trying to copy and place one file to 'System32\Drivere\ETC' directory.

The above solution does not work in this case.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.