I have found a manual way of doing this, where if you go to your default user folders (3D Objects, Desktop, Downloads, Documents, Favorites, Pictures, and Videos), and right click then properties, then Location, you can then add a OneDrive folder location, which then changes the path that Windows sets.
What I am trying to do is get a batch file that one by one changes the user folders to pre-made folders in OneDrive, which will also copy the user files and folders to the new destination automatically.
Since this process seems like it can only be ran one folder at a time, maybe multiple batch files are needed for this to work, which I am fine with.
So to clarify here are the steps that I am looking for:
- Change the user default user folders location to a predefined folder in OneDrive. Here are the exact paths of this change:
%USERPROFILE%\3D Objects> %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\3D Objects
%USERPROFILE%\Contacts"> %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Contacts
%USERPROFILE%\Desktop"> %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Desktop
%USERPROFILE%\Documents"> %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Documents
%USERPROFILE%\Downloads > %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Downloads
%USERPROFILE%\Favorites" > %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Favorites
%USERPROFILE%\Links"> %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Links
%USERPROFILE%\Music"> %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Music
%USERPROFILE%\Pictures"> %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Pictures
%USERPROFILE%\Videos"> %USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\Videos
If this is done manually, this will prompt if you want to move the files and folder to the new destination, I want this to automatically say yes and move the files to the new OneDrive location. If this process is hard to do execute due to the file move, it can be separated into different batch files.
If this batch file is ran and this whole setup has already been accomplished, it will check the default OneDrive user folder location and if the user already has the user folder set as folders in OneDrive a message will inform them of this.
If any file or folder move does not copy successful, a log of the file and or folder and its path will display in a log file will be generated and be saved in
%USERPROFILE%\OneDrive - Olivet Nazarene University\LocalPC\
If the process is successful, a successful message is displayed at the end of the whole procedure in CMD.