az storage directory
Manage directories in Azure file shares.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az storage directory create |
Create a directory in a file share. |
Core | Preview |
| az storage directory delete |
Delete an empty directory. |
Core | Preview |
| az storage directory show |
Show the properties of a directory. |
Core | Preview |
az storage directory create
Create a directory in a file share.
Create a directory in a file share. Nested paths such as parent/child are supported, but the parent directory must already exist.
az storage directory create [--account-key]
[--account-name]
[--client-request-id]
[--metadata]
[--name]
[--sas-token]
[--share-name]
[--timeout]
[--url]
Examples
Create a directory
az storage directory create --account-name mystorageaccount --account-key $ACCOUNT_KEY --share-name myshare --name mydir
Create a nested directory
az storage directory create --account-name mystorageaccount --account-key $ACCOUNT_KEY --share-name myshare --name mydir/child
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Storage account key.
Storage account name. Used with the share name and directory path when --url is not given.
An opaque, globally-unique, client-generated string identifier for the request.
Metadata in space-separated key=value pairs.
The directory path within the share, e.g. parent/child. The parent must exist.
A shared access signature. Alternative to --account-key.
The share name.
The timeout parameter is expressed in seconds.
The directory URL. Alternative to --account-name, --share-name and --name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az storage directory delete
Delete an empty directory.
Delete a directory from a file share. The directory must be empty.
az storage directory delete [--account-key]
[--account-name]
[--client-request-id]
[--name]
[--sas-token]
[--share-name]
[--timeout]
[--url]
Examples
Delete a directory
az storage directory delete --account-name mystorageaccount --account-key $ACCOUNT_KEY --share-name myshare --name mydir
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Storage account key.
Storage account name. Used with the share name and directory path when --url is not given.
An opaque, globally-unique, client-generated string identifier for the request.
The directory path within the share, e.g. parent/child. The directory must be empty.
A shared access signature. Alternative to --account-key.
The share name.
The timeout parameter is expressed in seconds.
The directory URL. Alternative to --account-name, --share-name and --name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.
az storage directory show
Show the properties of a directory.
Get the properties and metadata of a directory in a file share.
az storage directory show [--account-key]
[--account-name]
[--client-request-id]
[--name]
[--sas-token]
[--share-name]
[--snapshot]
[--timeout]
[--url]
Examples
Show a directory
az storage directory show --account-name mystorageaccount --account-key $ACCOUNT_KEY --share-name myshare --name mydir
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Storage account key.
Storage account name. Used with the share name and directory path when --url is not given.
An opaque, globally-unique, client-generated string identifier for the request.
The directory path within the share, e.g. parent/child.
A shared access signature. Alternative to --account-key.
The share name.
The share snapshot to query.
The timeout parameter is expressed in seconds.
The directory URL. Alternative to --account-name, --share-name and --name.
Global Parameters
Increase logging verbosity to show all debug logs.
Show help for the command or group and exit.
Bypass the extension discovery cache and reload extensions from disk.
Output format.
| Property | Value |
|---|---|
| Default value: | json |
| Accepted values: | json, jsonc, table, tsv, yaml, yamlc |
JMESPath query string to filter/project the command result before rendering.