This paper provides a new algorithm for the optimization of distribution networks feeder configuration. The algorithm starts analysis from high-voltage/medium-votage (HV/MV) substations with all loads MV/low-voltage (MV/LV) substations being disconnected, and picks up loads that result in minimal incremental losses. Optimality is always ensured by checking on relationships correlating currents and paths using the concept of dynamic programming, and performing configuration changes whenever required. The algorithm relies on the comparison of the incremental losses brought by the addition of each and every load to the network. Quadratic and linear relationships between load currents and paths form the basis of the decisions made for the connections. The algorithm is illustrated with the help of a detailed numerical example. The geographic information systems software, ArcView, was used as the developing tool.