delete all files of a file type in dir code example
Example 1: delete all files in a directory command
rd /s/q Foldername
Example 2: delete all files in a directory except
$ rm -v !("filename") #Delete all files in a directory except filename
rd /s/q Foldername
$ rm -v !("filename") #Delete all files in a directory except filename