Erasing rows from .txt files in a folder

Job ID: 31362146

Budget: $10 – $30 USD

I have a folder containing multiple .txt files of the form that I attach.
I want a simple program that will erase x rows from the bottom of each .txt file in that folder.
I will specify the path of the folder and the number x, hit 'Run' and the program will do the job.
It is a very simple .exe but I need it within the following few hours for sure.