These days all the clients are looking for migrating their data from local environment to SharePoint / Office 365 for better collaboration. As part this migration process for better progress and quick migration we need to implement some automation process. The best way(s) to migrate data from local folders / drives to SharePoint or Office 365 is:
-> PowerShell scripting
-> Implementing windows application with managed client side object model
-> ECMA script to upload files
As discussed above I would like to discuss about the first approach PowerShell scripting. To read all the files from the local drive / folder we need to make use of recursion.
Code sample for implementing recursion in PowerShell.