How to run .bat file in Azure CLI ?

Niu, Chuang (Contractors) 65 Reputation points
2024-02-14T09:17:51.9+00:00

Hi all i want use .bat file to create directory hierarchy in storage account via Azure CLI .bat file like this

#Create directory
az storage fs directory create --name root --file-system $storagecontainerName --account-name $accountName
az storage fs directory create --name root\hierarchya\hierarchya_1 --file-system $storagecontainerName --account-name $accountName
az storage fs directory create --name root\hierarchyb\hierarchyb_1\hierarchyb_101 --file-system $storagecontainerName --account-name $accountName

can everyone help me, please~ Thanks!

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,536 questions
0 comments No comments
{count} votes

Accepted answer
  1. dashanan13 930 Reputation points
    2024-02-15T23:36:58.11+00:00

    Hei @Niu, Chuang (Contractors) , Thank you for contacting Microsoft Community. As i understand, you want to run a bat file on the shell hosted on Azure portal. If this is the need, it can be achived as folllows: Upload the file to the shell Change permission for execution with "chmood +x <filename>" execute the file

    • I have attached the video for reference

    If you feel like this helped, consider marking this as answer.

    sol

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.