This paper shows a new computational method to obtain filiform Lie algebras, which is based on the relation between some known invariants of these algebras and the maximal dimension of their abelian ideals. Using this relation, the law of each of these algebras can be completely determined and characterized by means of the triple consisting of its dimension and the invariants z1 and z2. As examples of application, we have included a table showing all valid triples determining filiform Lie algebras for dimension 13