I've set up a logic app to move my new files on my FTP server to my azure storage container, which has blobs for my files. I found a way to create new folders using the storage explorer, but is there a way I can automate this using logic apps? For example, if a new folder is created in my FTP and files are added to it, I want to create a blob folder and move those files into that blob.
1 Answers
6
votes
First of all, Azure blob storage doesn't support folders. There is only your storage account and a list of container containing blobs.
What you can do is to simulate a directory by adding a name that contains a slash, e. g. uploading the following file:
/myVirtualFolder/test.txt
Will upload the file to your desired container and tools like storage explorer will parse the slashes and display them as a folder:
But if you check the metadata for test.txt, you will see that the actual file name is /myVirtualFolder/test.txt
:
So all you have to do is to upload all your files from your target directory to the container by adding the virtual directory to its name. You can`t and don't have to create a folder first.