OneDrive Duplicate Folders is more likely than you might think. Read on for my fix.
- 1 The Unconventional Guide to OneDrive Duplicate Folders
- 2 My Workflow
- 3 The Problem – OneDrive Duplicate Folders
- 4 Possible Solutions
- 5 The Solution That Worked
- 6 Fixing Dreamweaver
- 7 Fixing My Test Server
- 8 Fixing My Hosts File
- 9 Fixing Git Repositories
- 11 Fixing My Laptop
- 12 The Unconventional Fix that Works
The Unconventional Guide to OneDrive Duplicate Folders
My procedure was originally written after the mess of Microsoft changing the name of their cloud service.
Since then OneDrive has crashed many times so I have resorted to various mean, albeit unconventional to fix OneDrive Duplicate Folders.
Skip to the end to see the “unconventional fix that works“.
Microsoft changed its name from SkyDrive to OneDrive and promised that there would not be anything we would have to worry about.
One day I noticed that some of my files were not current on OneDrive.
Although this article specifically addresses issues with OneDrive it applies to other cloud services like DropBox & Google drive in a general way. If you have issues with updating from your existing cloud service some of these steps may help.
My workflow used to be entirely in the cloud but that didn’t work out.
Maybe you will have better luck with OneDrive Duplicate Folders.
My unconventional advice is to work on files locally and then propagate them to the cloud solution of choice.
I prefer DropBox as it hangs up less on me than OneDrive.
I typically do my work on my desktop and let it synchronize to my laptop & phone.
I use Dreamweaver to maintain about 50 sites and the SkyDrive path is part of the setup for the sites. I also have an XAMPP test server setup in Dreamweaver for the 50 or so websites I handle. I use a host reference for simplicity in accessing my files from a browser.
I backup Dreamweaver by exporting all the sites to a folder so I can easily re-create the sites on a new PC and/or my laptop.
I use Git repositories & external repositories for version control.
The Problem – OneDrive Duplicate Folders
Everything worked fine for some time. Then one day I noticed that I wasn’t seeing fresh files downloaded from the cloud. Further investigation showed two OneDrives in my User folder. The set with the cloud icon was being uploaded and the other was not.
Figure 1 – New & old OneDrive (old SkyDrive)
It wasn’t obvious how I ended up with two OneDrive folders. Further investigation showed one had OneDrive in the path while the old folder had SkyDrive. Naturally all my paths in Dreamweaver were set to the latter. Ditto for my test server.
New OneDrive path
Old OneDrive path
I tried unlinking and re-linking to OneDrive but that didn’t merge the double OneDrives.
Next, I tried uninstalling & re-installing OneDrive. That started the OneDrive folder over again and just downloaded the files from the cloud which was not what I wanted since those had not been updated.
The Solution That Worked
Lastly, I uninstalled & re-installed OneDrive while pausing the installation at the 1st step. This time, I copied my updated files into the newly created OneDrive folder. That took a while since I had over 7G & thousands of files. Once it was copied over, I let the OneDrive installation finish. Finally, OneDrive was updating as I wanted.
That still left me with the original OneDrive folder. I could probably have moved them rather copying but I like to make sure things are working as I expected before burning that bridge.
Now I had to correct the paths in my Dreamweaver setup so that I could use the new OneDrive. Otherwise, the files wouldn’t be updated. To make sure I was using the correct folder, I moved the original OneDrive (SkyDrive) folder so there wouldn’t be any confusion. I could have just deleted it but I like to make sure everything is working properly before taking that step.
Changing the paths for each site & the test server became tedious with 50 sites. I created a fresh set of backups for all my sites and used a tool to manipulate the .ste files to change all the references to SkyDrive. Once the files had the proper reference, I removed all my sites & imported the new setup files.
NOTE: The Dreamweaver backup files are XML so editing is not an issue. The password hash is not difficult to decode so make sure these are stored in a secure location.
Fixing My Test Server
XAMPP Apace files had to be updated to use the new path.
httpd.conf (c:\xampp\apache\conf)<Directory “C:\Users\Randy\OneDrive\webroot”> Options Indexes MultiViews Order Allow,Deny Allow from all </Directory>
httpd-vhosts.conf (c:\xampp\apache\conf\extra) ##</VirtualHost> <VirtualHost 127.0.0.1:80> DocumentRoot “C:/Users/Randy/OneDrive/webroot” ServerName oneroot.loc ServerAlias oneroot.loc ErrorLog “C:/Users/Randy/OneDrive/webroot/logs/error.log” CustomLog “C:/Users/Randy/OneDrive/webroot/logs/access.log” combined </VirtualHost>
Fixing My Hosts File
Originally I was using skyroot.loc.
hosts – C:\Windows\System32\drivers\etc Open editor as administrator 127.0.0.1 oneroot.loc
Fixing Git Repositories
My initial problem was that my OneDrive folder was not uploading to the cloud and consequently not propagating to my other devices. I wasn’t sure how long this had gone on but it seemed recent.
After getting my OneDrive back in operation, I found that there were some places that had not synched properly. I suspect that the copy in the cloud must have taken precedent over my final copies on my PC. This is where Git proved to be a lifesaver. I reviewing the histories of the out of date websites & found that it showed local changes had not been incorporated. After merging everything was as I expected it. I reviewed the history of all my websites and found only a couple that needed merges. These were recently updated sites that never uploaded with the old OneDrive.
The merge folder created the additional versions of my affected files so I added entries into .gitignore to ignore them.
Figure 2 – merge created files with the name of my PC
I added the following to my .gitignore so the newly created files wouldn’t be an issue.
It was comforting to not only fix my synchronization problems with Git but also vindicate the rest of my websites.
Fixing My Laptop
I had to repeat the same steps that I used for my PC on my laptop.
- Uninstall OneDrive
- Start the install & pause it while copying the SkyDrive files into the newly created OneDrive folder.
- Finish the OneDrive install after files have finished copying
- Move the SkyDrive folder to an external drive
- Remove Dreamweaver sites
- Import Dreamweaver sites
- Setup XAMPP apache files
- Setup host file
The Unconventional Fix that Works
What works best for me is to selective synchronize folders and keep copies on my external drive.
For static files that don’t change much, they can be uploaded to the cloud and removed from synchronization.
I set the main folders to synchronize and uncheck the sub-folders. That way I can add to the folder & get it uploaded.
This is not a totally automated but it’s the unconventional fix that works for OneDrive Duplicate Folders.