To use Robocopy to transfer data:

1.Make sure you are an admin to that machine

2.On the shared drive ensure you do share to everyone full rights

3.Add your account on the shared drive and give full rights also

4.Open the PowerShell ISE and run as administrator

4.use the below command to execute


$SourcePath = ''

$DestinationPath = ''

Robocopy $SourcePaacth $DestinationPath /E /ZB /DCOPY:DAT /COPYALL /R:S /W:10 /MIR


eg

$SourcePath = 'D:\'

$DestinationPath = '\\192.168.102.25\reg'

Robocopy $SourcePath $DestinationPath /E /ZB /DCOPY:DAT /COPYALL /R:S /W:10 /MIR


in the event that the folders dissapear after copying use the below commands to restore



The easiest way to resolve this is through the command line.

  • Open a command prompt and change the focus to the drive in question (e.g. x:)
  • Then use the command dir /A:S to display all directories with the System attribute set.
  • Locate your directory name and then enter the command ATTRIB -R -S x:\MyBackup /S /D where x:\ is the drive letter and MyBackup is your directory name.
    The /S re-curses subfolders and /D processes folders as well.


for the names with blank space use quotes mark in the start and end


attrib -h -s e:\REGULATORY\"regulatory data"