delete file in path cmd code example Example 1: delete all files in a directory cmd del /S C:\Path\to\directory\* Example 2: how to remove a file in command line del filename