我正在尝试使用 Powershell 删除 Azure 存储目录:-
# the Context is already set correctly, not showing it here though
if( $myshare -eq $null )
{
$myshare=New-AzureStorageShare -Name "share" -Context $context
}
Remove-AzureStorageDirectory -ShareName "share" -Path "mycontainer/mydir/dir1" -Context $context -Confirm:$false
我收到以下错误:-
Remove-AzureStorageDirectory : The remote server returned an error: (404) Not Found. HTTP
Status Code: 404 - HTTP Error Message: The specified parent path does not exist.
At C:\test.ps1:21 char:1
+ Remove-AzureStorageDirectory -ShareName "share" -Path "mycontainer/my ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Remove-AzureStorageDirectory], StorageException
+ FullyQualifiedErrorId : StorageException,Microsoft.WindowsAzure.Commands.Storage.File.Cmd
let.RemoveAzureStorageDirectory
这就是我试图删除的文件夹(dir1)在我的存储中的存在方式:-
mycontainer/mydir/dir1
所以路径非常存在。我不确定它会期待什么。