Exchange 2013: forfiles.exe /p "C:\program files\microsoft\exchange server\v15\logging" /s /m *.log /d -2 /c "cmd /c del @file" forfiles.exe /p "C:\inetpub\logs" /s /m *.log /d -2 /c "cmd /c del @file" forfiles.exe /p "C:\program files\microsoft\exchange server\v15\transportroles\data\temp" /s /d -2 /c "cmd /c del @file" forfiles.exe /p "C:\Windows\System32\LogFiles\HTTPERR" /s /d -2 /c "cmd /c del @file" Windows 2003 TS: FOR /D %%A IN ("c:\documents and settings\*") DO DEL /S /Q /F "%%A\LOCAL SETTINGS\TEMPORARY INTERNET FILES" FOR /D %%A IN ("c:\documents and settings\*") DO DEL /S /Q /F "%%A\LOCAL SETTINGS\TEMP" Nested file deletion (file name too long with hidden/system files) attrib /S /D -H -S d:\temp\r :while1 attrib /S /D -H -S "d:\temp\r\application data" move "d:\temp\r\application data" "d:\temp\r\r.new" move "D:\temp\r\r.new" "d:\temp\r.new" rmdir /s /q d:\temp\r move "D:\temp\r.new" "d:\temp\r" goto :while1 rem - first line resets hidden/system attributes on main folder, second line is pointer, third line resets hidden/system attributes on nested folder, fourth and fifth lines moves nested folder 1 up a level, sixth line removes the parent folder, seventh line moves the nested up to parent, eighth redirects to the pointer for infinite loop icacls "E:\VM Servers\VM Configuration Files\Virtual Machines\F6C1D8E5-5B21-49DE-8809-715DFA8CCA15\F6C1D8E5-5B21-49DE-8809-715DFA8CCA15.BIN" /grant "NT VIRTUAL MACHINE\F6C1D8E5-5B21-49DE-8809-715DFA8CCA15":f /T icacls "E:\VM Servers\VM Configuration Files\Virtual Machines\F6C1D8E5-5B21-49DE-8809-715DFA8CCA15\F6C1D8E5-5B21-49DE-8809-715DFA8CCA15.VSV" /grant "NT VIRTUAL MACHINE\F6C1D8E5-5B21-49DE-8809-715DFA8CCA15":f /T