Skip to main content
I have an issue that I have 2 difference folders (sub folders are same name).

 

How can I merge these 2 folders into one.

 

For example:

Before                            
                            
    Folder A                Folder B        
        Sub 1                Sub 1    
            file 1                file 2
        Sub 2                Sub 2    
            file 3                file 4
             
After                            
    Folder A                        
        Sub 1                    
            file 1                
            file 2                
        Sub 2                    
            file 3                
            file 4                


In the simplest way I just Get all the items inside folder A and Folder B. Put it to a Structure with child and parent for each A and B. Then Loop over the structure to get which files will be inserted to sub folder of folder A. Then call the copy API for each file. But When the number of file is so much, I think it will be slow to copy each file to the destination folder or even we reach the rate limit for a day. 

 

Thank you for reading my problem.

Hi there, 


Welcome to Box Community and glad to help! 


A new ticket has been made for this query. I'll have a member of our team to get in touch and please keep an eye out. 


Thanks for posting! 


Did anyone ever respond with a solution?  I have the same challenge but with one additional complexity.   In some cases, there are two files with the same name and I want to merge such that I only have one copy of each file (the one with the latest modification date).


Reply