Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个很大的目录,里面有很多子目录和文件。出于测试目的,我需要使用确切的目录结构(也为空目录)创建上面的副本,但只从每个子目录中复制两个文件(不管是哪两个)。我怎样才能使用 xcopy 做到这一点。
我认为这不能直接使用 JUST xcopy来完成。您将能够使用此命令复制目录结构和 NO 文件:
xcopy /e /t path/to/folder path/to/copied/location
话虽如此,使用 C++(我更喜欢 Qt 的QDir类)并从每个目录中仅复制 2 个文件将非常简单
QDir