VC++项目清理bat文件

@echo Off
del /s /a *.txt *.exe *.suo *.ncb *.user *.pdb *.netmodule *.aps *.ilk 2>nul
FOR /R . %%d IN (.) DO rd /s /q "%%d/x64" 2>nul
FOR /R . %%d IN (.) DO rd /s /q "%%d/Debug" 2>nul
FOR /R . %%d IN (.) DO rd /s /q "%%d/Release" 2>nul
FOR /R . %%d IN (.) DO rd /s /q "%%d/Bin" 2>nul
FOR /R . %%d IN (.) DO rd /s /q "%%d/Obj" 2>nul

rem If the Properties directory is empty, remove it
FOR /R . %%d in (.) do rd /q "%%d/Properties" 2> nul

 

 

以上保存为bat文件,放在项目目录下,运行即可。

扩展名自己可以根据需要修改。

从一本书的光盘上找的。

你可能感兴趣的:(VC++项目清理bat文件)