Skip to content

Unable to move blob to virtual directory with az storage fs file move #27800

@williamoconnorme

Description

@williamoconnorme

Describe the bug

When attempting to move a blob file within the same container to a new virtual path, an error is returned regarding its parent directory not existing. Blobs can only be moved to the root of the container

Command toe reproduce:
az storage fs file move --file-system "myContainer" --path "myfile.json" --new-path "myContainer/myFolder/myfile.json

Related command

az storage fs file move

Errors

The parent directory of the destination path does not exist.
ErrorCode:RenameDestinationParentPathNotFound

Issue script & Debug output

az storage fs file move --file-system "myContainer" --path "myfile.json" --new-path "myContainer/myFolder/myfile.json

Expected behavior

File should be moved/renamed with virtual path prefixed.

Environment Summary

{
"azure-cli": "2.53.1",
"azure-cli-core": "2.53.1",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"aks-preview": "0.5.161",
"azure-devops": "0.25.0",
"interactive": "0.5.3",
"storage-preview": "0.8.3"
}
}

Additional context

The documentation for az storage blob move states that az storage fs file move should be used as the former command is deprecated however there is not parity in functionality when moving a blob from one path to another virtual directory.

https://learn.microsoft.com/en-us/cli/azure/storage/blob?view=azure-cli-latest#az-storage-blob-move

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamOKR CandidateThis label is used to track how many GitHub issues we have resolved for OKR purpose.Storageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-author-feedbackMore information is needed from author to address the issue.no-recent-activityThere has been no recent activity on this issue.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions