In the C ++ project directory written with vs, there are always some unwanted temporary compilation files or vs data index files. These files are large in size, for example. the number of SDF files reaches about 70 MB, which makes code backup troublesome.
When backing up code, you only need to leave some required source files, which are usually less than 1 MB in total. Therefore, clearing the project directory is very necessary.
The following is a. Bat tool for clearing the project directory:
@ Echo off
Echo ===================================================== =====
Echo = [name:] project cleanup. Bat =
Echo = [] cbnote =
Echo = [Date:] 2014-08-28 =
Echo = [version:] ver1.0 =
Echo = [URL:] http://blog.csdn.net/cbnotes =
Echo ===================================================== =====
Pause
ECHO is being cleared. Please wait ......
Echo ===================================================== ==========================================
For/R % dir % d in (vc60.pdb vc90.pdb *. exp *. OBJ *. PCH *. IDB *. NCB *. opt *. PLG *. res *. SBR *. ILK *. APS *. SDF *. temp *. DCU *. BSc) Do del/f/S/Q "% d" 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
Echo ===================================================== ==========================================
ECHO file cleared! This program will exit in 5 seconds! Now the countdown .........
@ Echo off
Echo wscript. Sleep 300> % Temp %. \ TMP $. vbs
Set/A I = 5
: Timeout
If % I % = 0 goto next
Setlocal
Set/A I = % I %-1
Echo countdown ...... % I %
Cscript // nologo % Temp %. \ TMP $. vbs
Goto timeout
Goto end
: Next
CLS &
Echo.
Copy the above Code to notepad and change the name to XXX. bat!
The files to be cleared are incomplete. You can add them as needed.
[Note:] The tool is searched and deleted in the directory where it is located.
VC project spam gadgets (. BAT)