1
Get-ChildItem -recurse | ? {$_.Extension -eq ".obj" } | %{del $_}
~~~~~~
CategoryInfo : ObjectNotFound: (C:\Temp\compilerLimits\template.obj:String) [Remove-Item], ItemNotFoundException
FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand
試圖遞歸刪除所有.obj文件; 反而我得到這個。我的遞歸刪除有什麼問題?
謝謝。 PowerShell是否在任何東西的底層使用.net api? – igbgotiz
它廣泛使用.NET API。有一些使用DCOM和可能對Win32的一些pinvokes。 –
不錯的書可能實際上比我正在閱讀的其他PowerShell書更好。只是想提一下關於'foreach'和'$ null'的部分,在'Working with Empty Sets'下應該更新到至少注意到v3已經修復了這種行爲。 –