Is there a command in windows that will delete all the directories and files withing a directory but not the root directory?
ie C:\files\today\ {contains various files/folders that could be named as anything that need deleting, essentially a temp folder}
CD is C:\
Using RMDIR /S /Q files\today\ will deleting everything but it will also delete the folder 'today' which I don't want it to do. I can't do RMDIR /S /Q C:\files\today\somefolder\ as 'today' may contain files which'll be left out. I know I can run multiple commands to achive this (such as re-creating the folder afterwards) but was hoping it could be done with just one.
ie C:\files\today\ {contains various files/folders that could be named as anything that need deleting, essentially a temp folder}
CD is C:\
Using RMDIR /S /Q files\today\ will deleting everything but it will also delete the folder 'today' which I don't want it to do. I can't do RMDIR /S /Q C:\files\today\somefolder\ as 'today' may contain files which'll be left out. I know I can run multiple commands to achive this (such as re-creating the folder afterwards) but was hoping it could be done with just one.