1
我試圖刪除文件後,檢查了一些事情。我捕捉整個路徑到一個變量並將它傳遞給Remove-Item
命令和我得到以下錯誤:在PowerShell中刪除文件時出現問題
Remove-Item : An object at the specified path E:\Import\IRIS_Import\working\RP
LS_BAI_20120719092600450-20120719093206.csv does not exist.
At E:\Import\IRIS_Import\FIX_IRIS_49_FILES_kr.ps1:53 char:13
+ Remove-Item <<<< $file
+ CategoryInfo : InvalidArgument: (:) [Remove-Item], PSArgumentEx
ception
+ FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.RemoveIte
mCommand
不知道爲什麼PowerShell是抱怨不是文件甚至有我可以看到該文件有物理。請有任何想法嗎?
做'測試的路徑「E:\導入\ IRIS_Import \工作\ RP LS_BAI_20120719092600450-20120719093206.csv'' – 2012-07-20 23:10:18