一键清除VC工程生成的垃圾文件
2007-04-20 22:53
351 查看
下载代码,并把它保存为.bat文件,然后运行这个批处理文件。
安装完成后,当点击一个目录时,右键菜单中会出现“清除VC工程”的菜单,这样就可以清除相应目录下的VC工程垃圾文件。
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
@echo off
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
cls
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
@rem BC微软自win2000以后都取消了批处理中常用的choice命令,为了兼容2k/xp/2k3不得不采用脚步进行用户确认交互
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo WScript.Quit(WScript.CreateObject(^"WScript.Shell^").Popup(WScript.Arguments(0),0,WScript.Arguments(1),4+32));>"%TEMP%ChoiceSubst.js"
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
if {%1}=={} goto help
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
if {%1}=={install} goto install
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
WScript "%TEMP%ChoiceSubst.js" "确认清除该目录下(包括子目录)的VC工程垃圾文件吗?" "%1"
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
if %ERRORLEVEL%==6 GOTO cleanfile
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
goto end
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
:cleanfile
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
del /q /s "%1*.hpj" "%1*.aps" "%1*.ncb" "%1*.opt" "%1*.pdb" "%1*.pch" "%1*.mdp" "%1*.plg" "%1*.obj" "%1*.exp" "%1*.bsc" "%1*.clw" "%1*.res" "%1*.sbr" "%1*.ilk" "%1*.idb"
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
goto end
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
:install
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo 开始安装
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
copy /Y "%0" %SystemRoot%system32CleanVcPrj.bat
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo Windows Registry Editor Version 5.00>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo [HKEY_CLASSES_ROOTDirectoryshellCleanVcProject]>>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo [HKEY_CLASSES_ROOTDirectoryshellCleanVcProject]>>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ^@=^"清理VC工程文件^">>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo [HKEY_CLASSES_ROOTDirectoryshellCleanVcProjectcommand]>>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo [HKEY_CLASSES_ROOTDirectoryshellCleanVcProjectcommand]>>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ^@=^"CleanVcPrj.bat ^"%%1^"^">>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
regedit.exe /s %temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
del /q %temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo 安装完成,祝您工作顺利!
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
pause
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
goto end
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
:help
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ┌──────────────────────────┐
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │说明: │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │VC工程清理工具 v1.0 2006/1/16 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │这个工具可以清理VC工程中的垃圾文件,带自安装功能。 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │绿色软件,只有3k大小,开放源码,随意修改。 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │有问题或者有更好的方法实现或增强,请别忘了告诉我哦。│
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │我的邮箱:modasi@163.com QQ号/MSN:730037@qq.com │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ├──────────────────────────┤
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │安装方法: │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │在cmd控制台窗口中带 install 参数运行即可。 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │例如 C:^>cleanvcprj.bat install │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ├──────────────────────────┤
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │使用方法: │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │在要清理的文件夹上点击右键,选择[清理VC工程文件]。 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │使用命令行调用也可以实现批量清理等功能,例如: │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │C:^>cleanvcprj.bat ^"要清除的目录^" │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo └──────────────────────────┘
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
WScript "%TEMP%ChoiceSubst.js" "您现在要进行安装吗?" "安装VC工程清理工具"
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
if %ERRORLEVEL%==6 GOTO install
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
goto end
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
:end
安装完成后,当点击一个目录时,右键菜单中会出现“清除VC工程”的菜单,这样就可以清除相应目录下的VC工程垃圾文件。
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
@echo off
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
cls
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
@rem BC微软自win2000以后都取消了批处理中常用的choice命令,为了兼容2k/xp/2k3不得不采用脚步进行用户确认交互
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo WScript.Quit(WScript.CreateObject(^"WScript.Shell^").Popup(WScript.Arguments(0),0,WScript.Arguments(1),4+32));>"%TEMP%ChoiceSubst.js"
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
if {%1}=={} goto help
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
if {%1}=={install} goto install
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
WScript "%TEMP%ChoiceSubst.js" "确认清除该目录下(包括子目录)的VC工程垃圾文件吗?" "%1"
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
if %ERRORLEVEL%==6 GOTO cleanfile
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
goto end
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
:cleanfile
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
del /q /s "%1*.hpj" "%1*.aps" "%1*.ncb" "%1*.opt" "%1*.pdb" "%1*.pch" "%1*.mdp" "%1*.plg" "%1*.obj" "%1*.exp" "%1*.bsc" "%1*.clw" "%1*.res" "%1*.sbr" "%1*.ilk" "%1*.idb"
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
goto end
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
:install
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo 开始安装
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
copy /Y "%0" %SystemRoot%system32CleanVcPrj.bat
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo Windows Registry Editor Version 5.00>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo [HKEY_CLASSES_ROOTDirectoryshellCleanVcProject]>>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo [HKEY_CLASSES_ROOTDirectoryshellCleanVcProject]>>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ^@=^"清理VC工程文件^">>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo [HKEY_CLASSES_ROOTDirectoryshellCleanVcProjectcommand]>>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo [HKEY_CLASSES_ROOTDirectoryshellCleanVcProjectcommand]>>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ^@=^"CleanVcPrj.bat ^"%%1^"^">>%temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
regedit.exe /s %temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
del /q %temp%CleanVcPrj.bat.reg
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo 安装完成,祝您工作顺利!
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
pause
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
goto end
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
:help
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ┌──────────────────────────┐
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │说明: │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │VC工程清理工具 v1.0 2006/1/16 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │这个工具可以清理VC工程中的垃圾文件,带自安装功能。 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │绿色软件,只有3k大小,开放源码,随意修改。 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │有问题或者有更好的方法实现或增强,请别忘了告诉我哦。│
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │我的邮箱:modasi@163.com QQ号/MSN:730037@qq.com │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ├──────────────────────────┤
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │安装方法: │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │在cmd控制台窗口中带 install 参数运行即可。 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │例如 C:^>cleanvcprj.bat install │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo ├──────────────────────────┤
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │使用方法: │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │在要清理的文件夹上点击右键,选择[清理VC工程文件]。 │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │使用命令行调用也可以实现批量清理等功能,例如: │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo │C:^>cleanvcprj.bat ^"要清除的目录^" │
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
echo └──────────────────────────┘
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
WScript "%TEMP%ChoiceSubst.js" "您现在要进行安装吗?" "安装VC工程清理工具"
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
if %ERRORLEVEL%==6 GOTO install
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
goto end
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
![](http://images.csdn.net/syntaxhighlighting/OutliningIndicators/None.gif)
:end
相关文章推荐
- 一键清除VC工程生成的垃圾文件
- ffmpeg 转换VC工具 V1.1.2 支持android.mk工程文件生成
- ffmpeg 转换VC工具已经可以生成工程文件
- 一键清除windows系统的垃圾文件(保存为BAT格式)
- 清理VC工程中的垃圾文件.bat
- ffmpeg 转换VC工具 V1.1.2 支持android.mk工程文件生成
- 利用批处理实现一键搞定SVN更新、CMake生成工程文件、VS打开sln、开文件夹的偷懒目的
- ffmpeg 转换VC工具已经可以生成工程文件
- ffmpeg 转换VC工具已经可以生成工程文件(续)
- ffmpeg 转换VC工具 V1.1.2 支持android.mk工程文件生成
- ffmpeg 转换VC工具已经可以生成工程文件
- ffmpeg 转换VC工具已经可以生成工程文件(续)
- 一键清理VC工程垃圾
- ffmpeg 转换VC工具已经可以生成工程文件(续)
- VC++工程编译生成 LINK:fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- vc工程生成的各种文件解释
- ffmpeg 转换VC工具已经可以生成工程文件(续)
- qmake生成vc2010工程文件
- 自动删除-IAR项目工程生成垃圾文件的工具
- ffmpeg 转换VC工具已经可以生成工程文件