问题描述
我正在尝试让XCOPY复制整个目录树及其所有文件,但是,其中一个目录路径包含一个隐藏文件夹,尽管您可以使用/ h parm指定复制隐藏文件,但这并没有似乎不适用于隐藏文件夹。我到处都是XCOPY的文档,而且似乎没有涉及隐藏文件夹的文档。但是也许有人知道不同?
I'm trying to get XCOPY to copy an entire directory tree and all its files, however, one of the directory paths includes a hidden folder, and although you can use the /h parm to specify copying hidden files, this doesn't seem to apply to hidden folders. I've been all over the docs for XCOPY and there doesn't seem to be one that deals with hidden folders. But perhaps someone knows differently?
`xcopy c:\profiles c:\aprofiles /r /e /h /v /y
除了隐藏的文件夹以外,上述方法都可以正常工作。我想我可以更改隐藏文件夹以使其不被隐藏,但其中有数百个。
The above works fine except for the hidden folders. I suppose that I could change the hidden folders to make them non-hidden, but there are a few hundred of them.
推荐答案
如@xanatos所说,它会在Windows 7中复制隐藏的文件夹。
As @xanatos says, it copies hidden folders in Windows 7.
我无法在Windows 2003 Server中复制隐藏的文件夹,是的,即使使用/ h开关。隐藏文件,是的,但不是隐藏文件夹。
I couldn't get it to copy hidden folders in Windows 2003 Server, yes, even using the /h switch. Hidden files, yes, but not hidden folders.
很奇怪。
这篇关于告诉XCOPY复制隐藏的文件夹以及隐藏的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!