xcopy "C:\SomeFolderName" "D:\SomeFolderName" /h /i /c /k /e /r /y
Use the above command. It will definitely work.
In this command data will be copied from c:\ to D:, even folders and system files as well. Here’s what the flags do:
/hcopies hidden and system files also/iif destination does not exist and copying more than one file, assume that destination must be a directory/ccontinue copying even if error occurs/kcopies attributes/ecopies directories and subdirectories, including empty ones/roverwrites read-only files/ysuppress prompting to confirm whether you want to overwrite a file/zCopies over a network in restartable mode.
more flags are found here https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/xcopy