I think this should be rather simple but I want to delete all the files that are stated in for example: C:\TEST
but I want to leave the files that are located in subdirectories of this folder. For example files in the folder: C:\TEST\Backup
should not be deleted.
When using the following batch command all the files get deleted including those located in sub directories but it leaves the folder:
DEL /S C:\TEST\ /q
Does anyone know the command that I need?