@echo off :: The lines containing two colons are comments and have no effect on the batch file itself :: :: The command following the colon deletes files only and no subdirectory files or folders: echo Y | del "c:\somedirectory\*.*" :: The command following the colon deletes only files within subdirectories and the directory but not folders: del /s /q "c:\somedirectory\*.*" :: The command following the colon deletes files and folders and the subdirectory files and folders: rd /s /q "c:\somedirectory\" :: :: If you want to specify a file type replace the "_B_" in the example following the colon with the extension you want at the end of a file directory: *._B_ :: For Example: *.log would delete just log files. If you put *.* it will delete all file types (not folders). :: Lastly, if you put "c:\somedirectory\*.log" it would delete just log files in that specific directory. :: echo Y | del "C:\ProgramData\TVersity\Media Server\data\*.*" del /s /q "M:\*.log" del /s /q "N:\*.log" rd /s /q "C:\Users\USER1\AppData\Local\Temp" rd /s /q "C:\Users\USER2\AppData\Local\Temp" rd /s /q "C:\Users\USER3\AppData\Local\Temp" exit