Close

Results 1 to 5 of 5
  1. #1
    DF Super Moderator
    evilsatan's Avatar
    Join Date
    Jul 2004
    Location
    Essex
    Posts
    20,356
    Thanks
    1,194
    Thanked:        3,437
    Karma Level
    1592

    Default Advice needed to merge folders and handle dupes

    Some of you will be aware of my recent problems with Google Drive when it came to changing ownership of files so that I could delete user accounts and set up new accounts and grant permissions from a 'super admin' account.

    I have been left with some duplicated folders, most of the contents are also duplicated but Folder A may contain things that Folder B is missing and vice versa. The reasons for the dupes are two fold, even though some parent folders were owned by one account, as another account created subfolders and files they had ownership so each of the migrated accounts contained a folder with the same name. Secondly, Google Drive allows you to have files/folders with the same name in the same directory (ridiculous feature).

    I have synced all of the folders down to a PC as there is no decent way of dealing with dupes online in Google Drive so a third party utility needs to be used. I intend to make a backup copy of the dupes and then run a tool on the folders to merge them but the problem is each of the dupe folders may have a more up to date version of any given file so I can't copy/paste Folder B into Folder A and tell windows to skip all dupes as some updated documents may be lost. There are tens of thousands of files so I can't do it manually either.

    I have looked at WinMerge but it doesn't seem to have an efficient method. I guess what I am looking for is an app that allows me to copy the contents of folder B into folder A and tell it to use the file that is newer/larger if there is a conflict, if the file is older but larger then ask me to manually decide. Does anyone know of anything like this?

    Cheers


  2. #2
    DF PlaYa Squizza's Avatar
    Join Date
    Jun 2014
    Location
    London
    Posts
    575
    Thanks
    193
    Thanked:        210
    Karma Level
    115

    Default Re: Advice needed to merge folders and handle dupes

    Hey,

    Why don't you use some sort of version control software, something like Perforce - [Only registered and activated users can see links. ]
    It might be overkill and not worth the effort, but then it might be useful.

    Thanks to Squizza

    evilsatan (9th February 2015) 


  3. #3
    DF Super Moderator
    evilsatan's Avatar
    Join Date
    Jul 2004
    Location
    Essex
    Posts
    20,356
    Thanks
    1,194
    Thanked:        3,437
    Karma Level
    1592

    Default Re: Advice needed to merge folders and handle dupes

    Hadn't thought of that, will take a look. running 'Duplicate Cleaner' at the moment, set it to find files with same file name, content (MD5) and modified date. Was thinking at least I can move the identical files even if I do have to manually sort what's left, the majority should be identical files.
    Last edited by evilsatan; 9th February 2015 at 02:29 PM.


  4. #4
    DF Super Moderator Over Carl's Avatar
    Join Date
    Apr 2006
    Location
    London
    Posts
    13,191
    Thanks
    4,338
    Thanked:        1,779
    Karma Level
    1320

    Default Re: Advice needed to merge folders and handle dupes

    I've used robocopy loads of times to join two directories together keeping the newer versions of each.

    Sadly I haven't some across any way to also keep older/larger.

    Only way that springs to mind is using robocopy to merge, then windiff to pick up the older/larger files, although that could be some fun.

    Thanks to Over Carl

    evilsatan (9th February 2015) 


  5. #5
    DF Super Moderator
    evilsatan's Avatar
    Join Date
    Jul 2004
    Location
    Essex
    Posts
    20,356
    Thanks
    1,194
    Thanked:        3,437
    Karma Level
    1592

    Default Re: Advice needed to merge folders and handle dupes

    I have no idea why I didn't think of Robocopy myself! I have used it for other things but not merging before.

    Here's where I'm at now, in the root dir there are a few duped folders. I used Duplicate Cleaner to find the files as per my search term above, I then used the option to preserve each copy that resided in a particular directory (Folder A) and mark all copies in all other folders (Folder B) then moved them into a temp store just in case they are required down the line and preserved the folder structure. I then went into Folder B, deleted all desktop.ini files and copied the folders using Windows explorer and pasted into Folder A, merged the folders and manually dealt with the <10 files that remained (out of thousands).

    I am about to do the same with the big folder (90GB of data!!) but there will be one last problem when that finishes. In this case, inside of Folder A are also dupe folders, lots of them. I will probably need to merge all of these, I am meeting with someone from the company this week to make sure they weren't duped on purpose for any reason. I will take another look at Robocopy and see if it will work in this case, it differs as I am not merging Folder A and Folder B, instead I am merging Folder A into Folder A (1), Folder B into Folder B (1) etc. To manually run this task for each merge could take a while but better than nothing.


Similar Threads

  1. Replies: 9
    Last Post: 22nd March 2012, 03:05 PM
  2. advice needed please
    By satman in forum Digital & Cable TV
    Replies: 5
    Last Post: 20th March 2009, 03:17 PM
  3. Advice Needed
    By Lassan in forum Health & Fitness
    Replies: 8
    Last Post: 14th April 2006, 12:05 AM
  4. new pc needed for family member - advice needed please
    By Northernbloke in forum PC Hardware
    Replies: 2
    Last Post: 28th March 2006, 01:16 PM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •