我正在嘗試復制具有相同子檔案夾名稱的不同路徑中的所有檔案型別。
例子,
我想復制:
C:\PathA\FolderA\file1.filetype1
C:\PathA\FolderB\file2.filetype1
C:\PathA\FolderC\file3.filetype1
.
.
.
進入:
C:\PathB\FolderA\file1.filetype1
C:\PathB\FolderB\file2.filetype1
C:\PathB\FolderC\file3.filetype1
.
.
.
我怎樣才能做到這一點?
uj5u.com熱心網友回復:
如果您只想復制特定型別的檔案,您可以這樣做:
xcopy (SourceDirectory)\.filetype .\(DestinationDirectory) /S /Y
/S:復制目錄和子目錄(不包括空),您需要指定此引數才能使用子目錄
/Y : 自動確認覆寫目標目錄中的現有檔案
您可以指定/E而不是/S來復制空目錄。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/360579.html
