in reply to Remove whitespace between lines

This might do what you want. Itís meant to be invoked as a command line tool per file and it sends its results to STDOUT. Itís essentially a one-liner unrolled to a script. You can put in an -i flag to edit the file in place but this is risky. Donít do it unless you have backups and are going to check everything. Save it as, or whatever you likeĖ

Update: I donít have a lot of experience with WIN on this frontÖ Iím, not sure this will work for you as is.

#!/usr/bin/env perl -0777 -p # -0777, idiom for "slurp" mode. # Strip all trailing spaces including blank lines with spaces. s/[^\n\r\S]+(?=\r?\n)//g; # Reduces all triple or greater line spacing to double spaced lines. s/((?:\r?\n){2})(?:\r?\n)+/$1/g; # -p print at the end of each implicit loop. file dir-with-files/*