我创建了一个简单的 powershell 脚本,它将文件从源文件夹复制到具有相同目录结构的目标。
$source_path ="C:\Akash\Working\Source\*"
$backupPath="C:\Akash\Working\Dest"
copy-Item $source_path $backupPath -Recurse -EA "silentlycontinue"
Run Code Online (Sandbox Code Playgroud)
它工作正常,但是当我用 move-item 代替 copy-item 尝试它时,它会抛出一个错误:
Move-Item : A parameter cannot be found that matches parameter name 'Recurse'.
Run Code Online (Sandbox Code Playgroud)
有人请在这里建议...
powershell ×1