how to delete all files in a directory code example
Example 1: delete all files in a directory command
rd /s/q Foldername
Example 2: delete all files in a directory cmd
del /S C:\Path\to\directory\*
Example 3: delete all files in a directory except
$ rm -v !("filename") #Delete all files in a directory except filename