Skip to content

az storage fs file move not working with container files #30279

@scoop96

Description

@scoop96

Describe the bug

Hi, I was looking for a way to move a file inside a storage account > container > folder to another folder in the same container.

thank you

Related command

this is the command

az storage fs file move -f $globalEnvironment.Storage.StorageContainer 
        --account-name $globalEnvironment.Storage.StorageAccountName 
        -path $globalEnvironment.Storage.StorageContainer  
        --new-path $("test/" +$globalEnvironment.Storage.BlobName)

I know im creating a bug, but could not open a simple issue for help for lack of documentation or understandment, sorry.

-f -> im using the container name
--account-name -> im using the storage account name
-path -> the file is in the container/file.csv so im simply putting the filename file.csv
--new-path -> the folder is created already (i saw the issue #28708 ) so im simply putting test/file.csv

Errors

Regarding the output that im getting is this one:

ERROR: unrecognized arguments: pingid-automation

as where pingid-automation is the container name.

Issue script & Debug output

DEBUG: cli.knack.cli: Command arguments: ['storage', 'fs', 'file', 'move', '-f', 'pingid-automation', '--account-name', 'identity02asaaaa001', '-path', 'pingid-automation', '--new-path', 'test/users_afc.csv', '--debug']
DEBUG: cli.knack.cli: __init__ debug log:
Cannot enable color.
DEBUG: cli.knack.cli: Event: Cli.PreExecute []
DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x02F22A78>, <function OutputProducer.on_global_arguments at 0x032609D8>, <function CLIQuery.on_global_arguments at 0x032787A8>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
DEBUG: cli.azure.cli.core: Modules found from index for 'storage': ['azure.cli.command_modules.storage']
DEBUG: cli.azure.cli.core: Loading command modules:
DEBUG: cli.azure.cli.core: Name                  Load Time    Groups  Commands
DEBUG: cli.azure.cli.core: storage                   0.750        59       273
DEBUG: cli.azure.cli.core: Total (1)                 0.750        59       273
DEBUG: cli.azure.cli.core: Loaded 59 groups, 273 commands.
DEBUG: cli.azure.cli.core: Found a match in the command table.
DEBUG: cli.azure.cli.core: Raw command  : storage fs file move
DEBUG: cli.azure.cli.core: Command table: storage fs file move
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x038213E8>]
DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to 'C:\Users\SE99236\.azure\commands\2024-11-07.18-51-07.storage_fs_file_move.18364.log'.
INFO: az_command_data_logger: command args: storage fs file move -f {} --account-name {} -p{} {} --new-path {} --debug
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x038473E8>]
DEBUG: cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/profiles/_shared.py", line 659, in _get_attr
AttributeError: module 'azure.mgmt.storage.v2023_05_01.models' has no attribute 'ActiveDirectoryPropertiesAccountType'

DEBUG: cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/profiles/_shared.py", line 659, in _get_attr
AttributeError: module 'azure.mgmt.storage.v2023_05_01.models' has no attribute 'ListKeyExpand'

DEBUG: cli.azure.cli.core.profiles._shared: Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/profiles/_shared.py", line 659, in _get_attr
AttributeError: module 'azure.mgmt.storage.v2023_05_01.models' has no attribute 'CorsRuleAllowedMethodsItem'

DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x0387DB18>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x0387DB68>, <function register_upcoming_breaking_change_info.<locals>.update_breaking_change_info at 0x0387DBB8>]
DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): app.aladdin.microsoft.com:443
DEBUG: urllib3.connectionpool: https://app.aladdin.microsoft.com:443 "GET /api/v1.0/suggestions?query=%7B%22command%22%3A+%22storage+fs+file+move%22%2C+%22parameters%22%3A+%22%22%7D&clientType=AzureCli&context=%7B%22versionNumber%22%3A+%222.65.0%22%2C+%22errorType%22%3A+%22UnrecognizedArguments%22%2C+%22correlationId%22%3A+%22d15b66dc-0a06-494b-9dd5-967e9efa6446%22%2C+%22subscriptionId%22%3A+%2254f6184f-874c-4082-b79a-269f5641cd1c%22%2C+%22eventId%22%3A+%229a39733c-16fe-473c-911c-4382a2bb6aee%22%7D HTTP/1.1" 200 None
DEBUG: cli.azure.cli.core.azclierror: NoneType: None

ERROR: cli.azure.cli.core.azclierror: unrecognized arguments: pingid-automation
ERROR: az_command_data_logger: unrecognized arguments: pingid-automation

Examples from AI knowledge base:
https://aka.ms/cli_ref
Read more about the command in reference docs
DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x03821528>]
INFO: az_command_data_logger: exit code: 2
INFO: cli.__main__: Command ran in 3.193 seconds (init: 0.520, invoke: 2.673)
INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1
INFO: telemetry.client: Accumulated 0 events. Flush the clients.
INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1
INFO: telemetry.save: Save telemetry record of length 3787 in cache file under C:\Users\SE99236\.azure\telemetry\20241107185109626
INFO: telemetry.main: Begin creating telemetry upload process.
INFO: telemetry.process: Creating upload process: "C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\Lib\site-packages\azure\cli\telemetry\__init__.pyc C:\Users\SE99236\.azure C:\Users\SE99236\.azure\telemetry\20241107185109626"
INFO: telemetry.process: Return from creating process 21692
INFO: telemetry.main: Finish creating telemetry upload process.

Expected behavior

To simply move the folder

Environment Summary

azure-cli 2.65.0

core 2.65.0
telemetry 1.1.0

Dependencies:
msal 1.31.0
azure-mgmt-resource 23.1.1

Python location 'C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\python.exe'
Extensions directory 'C:\Users\SE99236.azure\cliextensions'

Python (Windows) 3.11.8 (tags/v3.11.8:db85d51, Feb 6 2024, 21:52:07) [MSC v.1937 32 bit (Intel)]

Legal docs and information: aka.ms/AzureCliLegal

Your CLI is up-to-date.

Additional context

No response

Metadata

Metadata

Labels

Auto-AssignAuto assign by botAzure CLI TeamThe command of the issue is owned by Azure CLI teamStorageaz storagecustomer-reportedIssues that are reported by GitHub users external to the Azure organization.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

Relationships

None yet

Development

No branches or pull requests

Issue actions