0

I would like to mirror a shared drive directory to a Sharepoint library. It seems that Robocopy copy each time every file. My command line is

Robocopy "source" "dest" /MIR /FFT /Z /XA:H /W:5 

I will never have a different file in the source with the same name so how can I do a robocopy based only on the file name ?

  • Are you migrating to Sharepoint Online? If so, have you considered using the Sharepoint Migration Tool? - https://docs.microsoft.com/en-us/sharepointmigration/introducing-the-sharepoint-migration-tool – joeqwerty Apr 20 '20 at 11:19
  • It's not a migration. It's between a samba shared drive and a sharepoint library – Geoffroy Cruxifix Apr 23 '20 at 06:49

2 Answers2

0

I use this:

robocopy source destination /ns /E /SEC /COPYALL /unicode /np /PURGE /Z /R:0 /W:0 /UNILOG+:C:\Users\myuser\robocopy.log

Krackout
  • 1,559
  • 6
  • 17
  • I will try. It it also a mirroring ? Because a need to delete the files from destination that are missing in source – Geoffroy Cruxifix Apr 20 '20 at 12:42
  • Yes it does mirroring. Actually /MIR is the equivalent of /E /PURGE, which I have included. The difference is that if using /MIR and the destination directory exists, the destination directory security settings are overwritten. – Krackout Apr 21 '20 at 14:41
  • https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/robocopy – Krackout Apr 21 '20 at 14:41
  • `NOTE : Security may not be copied - Destination might not support persistent ACLs. ERROR : You do not have the Manage Auditing user right. ***** You need this to copy auditing information (/COPY:U or /COPYALL).` – Geoffroy Cruxifix Apr 23 '20 at 06:47
  • Its the error I have received. Do you have an idea ? – Geoffroy Cruxifix Apr 23 '20 at 06:48
  • Don't you have admin rights? If you do have them, do you start an elevated command line? (right click, run as administrator on cmd). – Krackout Apr 23 '20 at 06:54
  • If you don't have admin rights, remove /COPYALL from parameters and try again. – Krackout Apr 23 '20 at 06:55
0

I think adding /xo /xn with/MIR would do it. That would exclude files with older or newer timestampe

Steven
  • 101