Language: NoFormat
Delete all folder contents except one folder
rem Replace {folder} with the folder whose content you want to delete
rem Replace {folderToKeep} with the folder under {folder} you DON'T want to delete
del /F /Q {folder}\*.*
for /D %i in ({folder}\*.*) do if /I NOT (%i)==({folder}\{folderToKeep}) rd /s /q %i
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

