XCopy, Copy, Paste, Create Directory/SubDirectory | Folder/SubFolder (edit)

Bin, Obj via command prompt

for /d /r . %d in (bin,obj) do @if exist "%d" rd /s/q "%d"

Bin, Obj via .bat file

for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d"

Articles

Xcopy + Appcmd + Cacls + iCacls - @manhng

MSBuild + Clean + Remove Bin/Obj Folder - @manhng

Deleting all BIN & OBJ folders - @manhng

set SourcePath=D:\Source\V3
set DestinationPath=C:\Deploy\V3
copy "%SourcePath%\xml\Config.xml" "%DestinationPath%\xml" /Y

if exist "%DestinationPath%\Template" (
echo Yes
) else (
mkdir "%DestinationPath%\Template"
)
xcopy "%SourcePath%\Template" "%DestinationPath%\Template" /E /H /C /I /Y

if exist "%DestinationPath%\Template" (
echo Yes
) else (
mkdir "%DestinationPath%\Temporary"
)
xcopy "%SourcePath%\Temporary" "%DestinationPath%\Temporary" /E /H /C /I /Y

pause