how to remove non empty directory in windows code example Example 1: delete non empty directory cmd rm -rf directoryname Example 2: remove directory not empty windows rd /s /q "path"