How do I create a new folder/subfolder on-premises file share from Azure logic apps?

Seethalakshmi TN 0 Reputation points
2023-06-09T06:04:38.6133333+00:00

I have a requirement to create a new folder in on-premises file share from Azure service. I am trying to achieve this with Azure logic apps, but I don't see an option to create a folder / subfolder using File System connector. Is there any way I can achieve this?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,551 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sedat SALMAN 14,180 Reputation points MVP
    2023-06-09T12:04:42.2233333+00:00

    https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-using-file-connector

    https://stackoverflow.com/questions/53496889/create-folder-in-azure-logic-apps-for-azure-file-storage

    Creating a new folder or subfolder directly on an on-premises file share from Azure Logic Apps isn't explicitly supported by the File System connector. The connector's capabilities include creating, getting, appending, updating, and deleting files, as well as listing files in folders or root folders, and getting file content and metadata. However, it does not provide a direct action to create a new folder or subfolder​.

    However, a workaround can be employed using the "Create File" action in Azure Logic Apps. When you use the "Create File" action and specify a path for the file that includes the new folder or subfolder you need, Azure Logic Apps will create any folders in the path that don't already exist. For example, if you specify the path as /newFolder/newSubfolder/newFile.txt, Azure Logic Apps will create newFolder and newSubfolder if they don't already exist, then create newFile.txt in the newSubfolder​.

    0 comments No comments

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.