问题描述
a
|
- c
|
- abc.txt
b
copy-item -Force -Recurse -Verbose "a\*" -Destination "b" -Include "*.*" -Exclude "Web.config" -Container
但是当我使用这些掩码时,文件夹不会被复制
当我删除 -Include "*.*"
copy-item -Force -Recurse -Verbose "a\*" -Destination "b" -Exclude "Web.config" -Container
然后一切正常,这是日志:
VERBOSE: Performing the operation "copy Directory" on target "Item: C:\Users\\Documents\test\a\c Destination:
C:\Users\\Documents\test\b\c".
VERBOSE: Performing the operation "Create Directory" on target "Destination: C:\Users\\Documents\test\b\c".
VERBOSE: Performing the operation "copy File" on target "Item: C:\Users\\Documents\test\a\c\dsd.txt
Destination: C:\Users\\Documents\test\b\c\dsd.txt".
所以基本上我的问题是,文件夹的掩码是什么?
解决方法
我傻了
文件夹的掩码将只是:*
因此,
*.*
=> *