Home Search

DriveWorks Pro 22
Create Directory in File Share

Send Feedback

Create Directory in File Share

Creates a sub-directory in an Azure File Share.

Properties

Property NameDescription
Connection StringThe connection string for the Storage Account.

See the Microsoft article Configure Azure Storage connection strings for more information.

Share NameName of the File Share.
Share Path The File Share path to create the directory in. Leave blank to create the directory at the root. Task will attempt creating any required directories.

Must adhere to the following rules:

  • A path name must not exceed 2048 characters in length.
  • The depth of subdirectories in the path must not exceed 250.
  • Directory and file names must not exceed 255 characters in length.
  • Directory and file names must not use the following characters: " \ : | < > * ? /
  • Directory and file names must not be empty or consist only of whitespace.
  • Directory and file names must not have their last character be a full stop.
  • Directory and file names must not have their last character be whitespace.
  • Directory and file names must not only consist of full stop characters.
Directory NameThe name of the directory.

Must adhere to the following rules:

  • Directory and file names must not exceed 255 characters in length.
  • Directory and file names must not use the following characters: " \ : | < > * ? /
  • Directory and file names must not be empty or consist only of whitespace.
  • Directory and file names must not have their last character be a full stop.
  • Directory and file names must not have their last character be whitespace.
  • Directory and file names must not only consist of full stop characters.

When this Task is added the properties are static. To be able to build rules on a static property see How To: Change A Static Property To A Dynamic Property.

Example

Create in Root Directory Example

Property NameExample RuleExample ResultMeaning
Connection StringDWVariableAzureStorageConnectionString DefaultEndpointsProtocol=https; AccountName=MyExampleName; AccountKey=MyExampleAccountKey; EndpointSuffix=core.windows.net This is the connection string used to identify the Azure Storage Account to connect to.
Share Name"My File Share"My File ShareThis is the name of the File Share to create the sub-directory in.
Share Path"" This is the path to create the sub-directory in. A blank or empty value will create the value at the root of the File Share.
Directory Name"MyNewSubDirectory"MyNewSubDirectoryThis is the name of the new Sub-Directory to create in the root.

Create in Sub-Directory Example

Property NameExample RuleExample ResultMeaning
Connection StringDWVariableAzureStorageConnectionString DefaultEndpointsProtocol=https; AccountName=MyExampleName; AccountKey=MyExampleAccountKey; EndpointSuffix=core.windows.net This is the connection string used to identify the Azure Storage Account to connect to.
Share Name"My File Share"My File ShareThis is the name of the File Share to create the sub-directory in.
Share Path"ExistingDirectoryA/ExistingDirectoryB"ExistingDirectoryA/ExistingDirectoryB This is the path to create the sub-directory in. This will result in the new directory to be created in 'ExistingDirectoryA/ExistingDirectoryB'.
Directory Name"MyNewSubDirectory"MyNewSubDirectory This is the name of the new Sub-Directory to create in the specified path. This will result in the directory 'ExistingDirectoryA/ExistingDirectoryB/MyNewSubDirectory'.

Using the Task in a Specification Macro

This task has different types of Outputs. For more information about Outputs see Specification Macros Task Node.

Outputs are only available within Specification Macros. Currently Outputs are not available for Specification Flow.

Status Outputs

This task supports Status Outputs. These can be used to perform different actions depending on what the status outcome of the task is. For more information see Status Outputs in the Task Node Outputs section of Specification Macros Task Node.

The status output navigation is as follows:

Success (one of the following occurred)

  • The Directory <Directory Name> has been created in the File Share <Share Name>.
  • The Directory <Directory Name> already exists in the File Share <Share Name>.

Success with Warnings

  • N/A - should never be fulfilled

Failed (one of the following occurred)

  • The provided Connection String is null or empty. Please provide a valid Connection String.
  • The provided Share Name is null or empty. Please provide a valid Share Name.
  • The Share Path <Share Name> is not a valid Azure File Share Path.
  • The Directory Name <Directory Name> is not a valid Azure File Share Directory Name.
  • The Directory <Share Path> could not be created in the File Share <Share Name>. Error occurred at <Share Path>.
  • The status of the Directory Path <Share Path> in the File Share <Share Name> is unknown. Error occurred at <Share Path>.

More Information

DriveWorks can be hosted on Microsoft Azure, for more information see Microsoft Azure.