【发布时间】:2020-05-01 09:00:43
【问题描述】:
我正在尝试从其父目录中找到一个文件夹,然后仅将内容复制到另一个文件夹,但仅复制空文件夹而不复制其内容。另外,我想在复制到新位置后从原始文件夹中删除内容。
$a = (Get-ChildItem C:\ProgramData\IsolatedStorage -recurse | Where-Object {$_.PSIsContainer -eq $true -and $_.Name -match "AssemFiles"})
$b = "C:\xyz\"
Copy-Item $a –destination $b -force
【问题讨论】:
标签: file directory copy location delete-file