Delete all files with a given extension recursively

Windows CLI one liner:

FOR /R "c:\path\to\directory" %I IN (*.gz) DO del "%I"

Just iterates recursively over the given directory, and in this case just the .gz files, and deletes them.

Leave a Reply

Your email address will not be published. Required fields are marked *