Calculate how to balance

Hi,

I am trying to figure out how to calculate the most effective way to move files between disks to have them balanced.

The same folders names exists on both disks and I want to move data to a single location by moving as little data as possible.

So far I have a datatable containing (foldername, size on disk1, size on disk2). I then checks all possible combinations of moving data and returns the combination with the lowest cost. It is horribly inneficient and I feel that there must be a better way. Currently i does 2 ^(number of folders) iterations.

Jo Kring,
Welcome to the forum. :wave:t3:

Where / how did you get the datatable?

Please share your code! (formatted as code please)

Wouldn’t it be enough to use robocopy from both sides? If the folder structure is the same on both sides robocopy skips files already present in the destination. :man_shrugging:t3:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.