[英]Replicate a directory file structure with empty files
I have a directory with this structure (real use case: thousands of files, 400GB directory!): 我有一个具有这种结构的目录(实际用例:数千个文件,400GB目录!):
mydir/
|---- blabla.mp4 3.2 GB
|---- foo/
|----- blup/
|----- test.wav 245 MB
|----- test.txt 12 KB
|---- xyz/
|----- test2.txt 10 KB
|---- zzz.wav 100 MB
How to replicate the tree structure + filename structure and get this, with Windows? 如何使用Windows复制树结构+文件名结构并获得它?
mydir_structure/
|---- blabla.mp4 0.0 KB
|---- foo/
|----- blup/
|----- test.wav 0.0 KB
|----- test.txt 0.0 KB
|---- xyz/
|----- test2.txt 0.0 KB
|---- zzz.wav 0.0 KB
From windows vista, robocopy
is included in the OS (for previous versions there is a download from Microsoft) 从Windows Vista中,操作系统中包含了robocopy
(对于以前的版本,可以从Microsoft下载)
robocopy \mydir \mydir_structure /create /e
/e
indicates a recursive copy including empty folders. /e
表示包括空文件夹的递归副本。
/create
creates the empty files in the target hierarchy. /create
在目标层次结构中创建空文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.