cmd文件复制,删除

删除文件夹:.net

@echo off
echo==========Begin================
set targetdir="%cd%\ALL"
set /p confirmdel=Confirm to delete the directory?(y/n):
if "%confirmdel%"=="y" goto del
if "%confirmdel%"=="Y" goto del
goto endget

:del
echo Processing...
rd /s /q %targetdir%
md %targetdir%
goto end
:end
echo==========End================
pause删除文件

文件夹复制di

@echo off
echo==========Begin================
set /p confirmcopy=Confirm to copy the directory?(y/n) :
if "%confirmcopy%"=="y" goto copy
if "%confirmcopy%"=="Y" goto copy
goto end文件

:copy
set sourcedir="源文件夹地址"
set targetdir="目标文件夹地址"
set copyparams=/e /i /y /w
xcopy %sourcedir% %targetdir% %copyparams%copy

:end
echo==========End================
pauseco

相关文章
相关标签/搜索