@echo off
cd "%1"
::chcp 65001
echo 正在清除VS项目垃圾文件，请稍等......

@echo 删除文件
del *.db *.obj  *.exp *.iobj  *.ipdb  *.pdb *.idb /s /f /a /q 
del *.log  *..iobj  *.ipdb  *.pdb *.pch /s /f /a /q 

@echo 遍历工程文件，删除所有ipch文件夹
for /f "delims=" %%a in ('dir /b/s/ad ^|findstr /c ".\ipch"') do rd /s /q "%%a" 

@echo 遍历工程文件，删除所有FileContentIndex文件夹
for /f "delims=" %%a in ('dir /b/s/ad ^|findstr /c ".\FileContentIndex"') do rd /s /q "%%a" 

@echo 遍历工程文件，删除所有.tlog文件夹
for /f "delims=" %%a in ('dir /b/s/ad ^|findstr /c ".\*.tlog"') do rd /s /q "%%a" 

@echo 遍历工程文件，删除所有.tlog文件夹
for /f %%i in ('dir /a:d /s /b *.tlog') do rd /s /q %%i 

