Migrating AD User Folders to GSuite

Hello All,

I am running RClone to migrate our users home folders in AD over to GSuite. I have setup a service account and have created the following batch script to go through a CSV and upload the documents to the users GSuite area:

for /f "tokens=1,2 delims=," %%1 in (AllUsers.csv) do (
md C:\scripts\UploadWork\Logs\%%1
rclone copy G:\Work\%%1 gdrive:/ -v --drive-impersonate %%2  >C:\scripts\UploadWork\Logs\%%1\%%1.log
)

Now the script appears to be uploading the 1st users files perfectly, but when it then moves onto uploading the 2nd users documents, I receive errors. Upon initial investigation it looks like when the script is running it's filling out a Drive ID attribute which can only be used on the first account in the script so when it comes to the 2nd suer the Drive ID is invalid.

Any ideas how to get around this?

Thanks

This should be the work around if I'm not mistaken:

Thank you, this has resolved the issue :slight_smile:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.