Developer's Diary
Daily software development, with Terry Ebdon
OneDrive Discrepancies

Thursday 22nd June, 2017

OneDrive - finding missing files

Finding the 20 missing files. There are 695 CR2 files on my Dublin backup drive, H:, for 2017-05-18 Dublin Zoo 5D3, but only 675 files on the corresponding OneDrive backup folder. The backup drive is connected to the Surface Pro 2, via USB 3. I'm viewing the OneDrive folder in a browser, on my MSI Wind U200. This makes comparing folders a little awkward. I decided to map OneDrive as O: drive on the MSI, via WebDAV. Not on the SP2, as that's already mapped to a different OneDrive account; you can't map two drives letters to different accounts on the same machine.

Next I sent a bare directory listing of the SP2's H: folder to a text file:

dir /b "H:\@photo\2017\2017-05-18 Dublin Zoo 5D3"\*.cr2 > "h-drive.txt"

and did the same with the MSI's O: folder:

dir o:\Documents\backup-1617\photo-1617\2017\"2017-05-18 Dublin Zoo 5D3" /b > "2017-05-18 Dublin Zoo 5D3.txt"

Bringing them both onto the SP2, I used WinMerge to find the missing files. But... it's not that easy. The O: listing is not in strict alphanumeric sequence. That's really odd, and I have no idea why.

Sorting the file should fix this:

sort "2017-05-18 Dublin Zoo 5D3.txt" /o "2017-05-18 Dublin Zoo 5D3.sorted.txt"

revealing the 20 missing files:

20170518_1347570321.CR2 20170518_1347570322.CR2
20170518_1348200323.CR2 20170518_1348220324.CR2
20170518_1348280325.CR2 20170518_1348420326.CR2
20170518_1348500327.CR2 20170518_1348500328.CR2
20170518_1348500329.CR2 20170518_1348550330.CR2
20170518_1348570331.CR2 20170518_1348570332.CR2
20170518_1349020333.CR2 20170518_1349020334.CR2
20170518_1349050335.CR2 20170518_1349050336.CR2
20170518_1349100337.CR2 20170518_1349110338.CR2
20170518_1349130339.CR2 20170518_1349180340.CR2


Top of page Recent Posts The Archives © 2017 Terry Ebdon

Find me on coding on BitBucket, networking on LinkedIn and hanging out on twitter.