Perl would do it. It's overkill, but you'll have a tool that can do just about anything.
If you're on Windows, download the latest from
http://strawberryperl.comTo delete all lines except multiples of 5, open a command line and type:
perl -i.bak -ne "print unless $. % 5" myfile.txt
Replace myfile.txt with your filename, or a space-separated list of filenames.
The "-i.bak" tells Perl to do an inplace edit when it prints. It creates a backup before starting, adding ".bak" to the original filename.
"-n" runs a little program that iterates through each line of the file(s).
"-e" is the flag that is followed by your code (within quotes) that executes on each iteration.
The program itself ("print unless $. % 5") prints lines (i.e. puts them into the new file) unless the current line number ("$.") modulus 5 ("% 5") is true.
Any non-zero number is True in Perl. So when you hit a line that's exactly divisible by 5, the modulus becomes 0 and the expression becomes false and the line prints.
To reverse the logic, use "print if $. % 5". This keeps all lines except the ones exactly divisible by 5.
To work with wildcards, all *.txt files for example, you could type this:
for %f in (*.txt) do perl -i.bak -ne "print unless $. % 5" "%f"
You could put the one-liner into a batch file, or re-write the program as .pl Perl script file. You could modify the script to take a command line argument for the line number to skip (every 2, every 5, etc), or prompt for that value, or... You get the idea!