C # programs always generate bin and obj folders, in order to reduce the size of the source code, it is necessary to delete the two folders, so think of a batch file to delete
The following is the code for the batch:
@echo off
Set nowpath=%cd%
Cd
CD%nowpath%
::d elete Specify File (*.pdb,*.vshost.*)
FOR/R%nowpath%%%i in (*.pdb,*.vshost.*) do (del%%i)
::d elete Specify folder (Obj,bin)
FOR/R%nowpath%%%i in (obj,bin) do (IF EXIST%%i rd/s/q%%i)
Echo OK
Pause
Note:
1, a batch of two half-width colon at the beginning of the comment out of this line
2, copy the above code to Notepad, and name the bat suffix file, such as Clear.bat.
3. The clear.bat is best placed in the directory (or upper directory) where the delete operation is to be performed.
If you delete a file, you can remove the sentence for/r%nowpath%%%i in (if EXIST%%i rd/s/q%%i), and then for/r%nowpath%%%i in (*.pdb,*.v shost.*) do (Del%%i) in this sentence (*.pdb,*.vshost.*) changed to the file to be deleted.