I want to migrate files from local drives to SharePoint Online. Copying files with the Windows Explorer changes the file dates, which I want to keep. My goal is to create a Batch file which helps the user to migrate the files to the cloud. The process needs to be as simple as possible for the enduser.
Robocopy does a good job by mirroring a complete folder BUT I can't connect it to SharePoint.
First I stumbled upon this thread here. When trying to map or access the SharePoint directory the CMD prompt wants me to add the SharePoint to the trusted sites.
Then I found this script here BUT when I run it none of the commands is recognized nor do they work.
My current code is this:
ROBOCOPY "C:\Users\XYZ1234\OneDrive\DEMO_SharePoint" "C:\Users\XYZ1234\Company\TestSharePoint - Dokumente\Robocopy Test" /COPY:DATO /MIR
This copies the files to the synced SharePoint folder on my computer (and keeps the created date) but when they are uploaded the created date/time is equal to the copy date/time.
Now I'm stuck. Any ideas from the community?