C # programs will always generate bin and obj folders, in order to reduce the size of the source code, it is necessary to delete the two folders, and then think of a batch file to delete.
The following is the batch code:
@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. Two half-width colon at the beginning of the batch processing comment out this line
2. Copy the above code into Notepad and name the file named bat suffix, such as clear.bat.
3, Clear.bat preferably put in the directory to perform the delete operation (or the upper directory)
If you delete a file, you can remove the sentence for/r%nowpath%%%i in (obj,bin) do (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.*) is changed to the file to be deleted.
C # quick way to delete bin and obj folders