For this type of migration, you can use UiPath’s Microsoft 365 / OneDrive activities.
A simple approach would be:
Read the files and folders from the shared/network drive.
Create the required folder structure in OneDrive.
Upload the files to the corresponding OneDrive folders.
Keep a log of successfully migrated and failed files.
Before uploading, check whether the file already exists to avoid duplicates.
For a large number of files, process them in batches and add proper exception handling and retry logic.
You should also check the required permissions and Microsoft 365/OneDrive connection before starting the migration.
For file permissions, keep in mind that copying the files with UiPath may not automatically reproduce all the original network-drive permissions, so those may need to be handled separately depending on your requirement.
For a shared/network drive → OneDrive migration, first create a OneDrive connection in Integration Service. Then build reusable modules for finding files/folders, downloading files, creating folders, uploading files, etc. for OneDrive.
If your existing automation also works with Excel, PDF, or other files, don’t try to migrate everything at once. Initially, migrate the files from the network drive to OneDrive, then download the file → perform the existing operation → upload it back to OneDrive.
In the next phase, you can build reusable components to perform Excel and other file operations directly from OneDrive, without downloading the files locally.
You can also add rules for duplicates (Skip/Replace/Rename) and logging/retry handling for failed files.