Please help to suggest how can I achieve the below.
I am generating some .txt files in a particular directory from a datastage job (ETL tool), some times where there are no records the files are generated with header only. I tried deleting the files based on the file size but the problem is the files which are generated with header and the files which are generated with detail some time are of the same file size.
What I am trying to do is check in the directory(c:\tmp) if all the .txt files have only one line if yes delete the files, but I am not sure how to achieve this.
Please suggest how can I write a batch script for this.