delete all files in directory but not 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\*
rd /s/q Foldername
del /S C:\Path\to\directory\*