Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
995
How to merge node contents when copying?
posted

I have an ultratree bound to a dataset. The design is like a mock Windows File System. I already have drag drop in place but want to be able to merge folders that have the same name like in Windows. If you have 2 folders with the same name in 1 location Windows ask if you want to merge the folders and replace existing files with the same name. Is there a way to do this easily or do you have any examples?

Thanks.

  • 69832
    Suggested Answer
    Offline posted

    I'm not exactly clear on how this relates to WinTree, it seems more of a general question about how to implement the merge algorithm. One possible approach would be to add the filenames (or whatever it is you are presenting with the control) from the target to a dictionary, then iterate each string in the source and check it against the dictionary to see if it exists in the target location. In Vista, a dialog is then shown to prompt the user as to whether they want to make copies or overwrite.