使用文件夹结构按类型复制文件


-1

我有一棵大树,像

folderA
  folderB
    file.any
    file.txt
  folderC
  folderD
    folderE
      file.txt
      file.any

我需要使用文件夹树复制所有* .txt文件。我该如何在Windows 8中做到这一点?是否有某些cmd命令或任何应用程序?

我需要的结果:

folderA
  folderB
    file.txt
  folderD
    folderE
      file.txt

Answers:


1

使用xcopy的CMD外壳,如:

xcopy /s {source-dir}\*.txt {target-dir}\

如果即使源中没有* .txt文件,也要保留完整的目录结构,/e则会创建空目录。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.