In this paper an algorithm for minimization of a nondifferentiable function is presented. The algorithm uses the Moreau-Yosida regularization of the objective function and its second order Dini upper directional derivative. The purpose of the paper is to establish general hypotheses for this algorithm, under which convergence occurs to optimal points. A convergence proof is given, as well as an estimate of the rate of the convergence.