Automate editing multiple text files?

I am trying to do some simple line moves and line deletes including 2 blank lines at the end each file on 1500 data .txt files - all formatted identically. Also, I cant figure out to select the last line of the file to delete in ATOM?
I can open a file, do the edits and save the file in ATOM.
However, I am missing how to do the same edits automatically on all the files.
I have read the manual and cant find an example of what to do?