Steps to Migrate from Shared Drive to OneDrive in UiPath

Hi everyone,

I’m currently looking for guidance on migrating files and folders from a shared/network drive to OneDrive using UiPath.

Could someone please explain the recommended approach and steps to achieve this migration using UiPath? In particular, I’d like to understand:

  • Which UiPath activities or packages should be used for the migration?

  • How can files and folders be uploaded from a shared drive to OneDrive?

  • How should folder structures and file permissions be handled?

  • Is there a recommended approach for handling large numbers of files or large file sizes?

  • How can we handle errors, duplicate files, and files that fail during migration?

  • Are there any best practices or prerequisites that should be considered before starting the migration?

Any examples, workflows, or references to relevant UiPath activities would be greatly appreciated.

Thanks in advance!

Hi @Vishnu_Vardhan9 ,
You can use this approach:

  • Use Get Files/Folders (or Directory.GetFiles) to read files from the network drive.
  • Use UiPath Microsoft 365 activities and authenticate with Microsoft 365.
  • Create the target folder structure in OneDrive using Create Folder activities.
  • Upload files using Upload File (OneDrive/SharePoint) activities.
  • Store migration logs in Excel or a database to track success/failures.

Thanks

Hi @Vishnu_Vardhan9,

For this type of migration, you can use UiPath’s Microsoft 365 / OneDrive activities.

A simple approach would be:

  1. Read the files and folders from the shared/network drive.

  2. Create the required folder structure in OneDrive.

  3. Upload the files to the corresponding OneDrive folders.

  4. Keep a log of successfully migrated and failed files.

  5. Before uploading, check whether the file already exists to avoid duplicates.

  6. 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.

Hope this helps!

Hi @Vishnu_Vardhan9,

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.

Thanks!