Illumination of nano- and micro-particles with a highly focused laser beam will exert a force on them that depends on different parameters, such as the particle size, refractive index and beam waist. In this paper rigorous diffraction theories are used to calculate the force on elliptically shaped dielectric cylinders in three different size regimes. We analyse the conditions for which the particles are attracted or repelled from the optical axis as a function of the geometry. Such a shape dependent response to optical wave-fields could be used to sort particles.