amio555 当前离线
列兵
jyswjjgdwtdtj 当前离线
中尉
set fso=createobject("scripting.filesystemobject") set folderfrom=fso.getfolder("C:\fromfolder") folderto="D:\tofolder" filetree folderfrom sub filetree(fdobject) set files=fdobject.files set folders=fdobject.subfolders for each file in files if not fso.fileexists(folderto&"\"&file.name) then fso.copyfile(file.path,folderto&"\"&file.name,false) end if next for each folder in folders call filetree(folder) next end sub复制代码
TOP
buyiyang 当前离线
@echo off rem 设置源目录和目标目录 set "so=d:\123" set "de=" cd /d "%so%" for /r /d %%i in (*) do robocopy /mt:32 /xc /xo /xn "%%i" "%de%" pause复制代码
qixiaobin0715 当前在线
大校
@echo off cd /d "D:\123" copy /y "*" "D:\456\" for /f "delims=" %%a in ('dir /s /b /ad') do copy /y "%%a\*" "D:\456\" pause复制代码