We will use the robocopy command in order to copy the folder and retain all the security permissions
robocopy "D:\Data\FolderName" "G:\Data4\FolderName" /MIR /SEC /ZB /V /r:1 /w:2 /nfl /ndl
In order to move the share permissions we have to open the following registry key,locate the share and change the path:
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares
Restart the Server service and we are done.