cmd批量復制某類型文件(無需保持目錄結構)


 

@echo off
set target_path=H:\SoftCodes\GDFS2021\BaseFrame\src
set copy_target_path=F:\20211125\
set vcffile=*.java
C:
cd %target_path%
for /f "delims=" %%s in ('dir /b/a-d/s "%target_path%"\"%vcffile%"') do (
echo %%s
copy /y "%%s" %copy_target_path%
)
pause

 

 

target_path為原目錄

copy_target_path為目標目錄

vcffile為需要復制的文件類型

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM