[英]How to delete files and folders but keep directory structure and leave behind a empty file instead of file itself?
[英]Replicate a directory file structure with empty files
我有一个具有这种结构的目录(实际用例:数千个文件,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
如何使用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
从Windows Vista中,操作系统中包含了robocopy
(对于以前的版本,可以从Microsoft下载)
robocopy \mydir \mydir_structure /create /e
/e
表示包括空文件夹的递归副本。
/create
在目标层次结构中创建空文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.