2
我试图运行以下脚本,我认为很简单。我在做什么这里拧......Powershell复制文件与变量
[Environment]::UserName = $username
Write-Host "The user is $username"
$from = "c:\Users\" + $username + "\favourites\*.*"
$to = "c:\test"
Write-Host "This is from dir: $from"
Write-Host "This is to dir: $to"
Copy-Item $from $to
脚本似乎并不喜欢+ $username +
...