Skip to content

Instantly share code, notes, and snippets.

@sachintha81
Created June 9, 2017 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sachintha81/c30ad6877e8a9d05bbe386a9541015f4 to your computer and use it in GitHub Desktop.
Save sachintha81/c30ad6877e8a9d05bbe386a9541015f4 to your computer and use it in GitHub Desktop.
Batch script to delete all files in current and sub folders excluding certain extensions.
@echo off
forfiles /s /c "cmd /c (if NOT @ext==\"bat\" del /s /q @path)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment