Best way to run .exe file in Azure? - azure

I have an .exe application that outputs a file into the folder path you give as an input. The end goal is to get the output file into blob storage.
I have considered azure functions but not sure if it is possible to provide it with a folder path ... anybody have any ideas?

If you want to run an .exe application in Azure, you can use Azure Functions. You can use an Azure Function to trigger the .exe application to run, and then use another Azure Function to get the output file from the application and store it in blob storage.

You should be able to accomplish your task in Azure Functions, but it does not run an exe. For that, you need Azure Batch to execute custom activity.

Related

How to get notified when a file is uploaded in ftp location using Azure and start copy job?

I need to start a copy job whenever a file(desired) is uploaded in an FTP location. so for notifying that the file is available in that location is there any way( like if the file is available then run this copy job) other than logic apps using ADF? can anyone please post some suggestions?
Azure DataFactory event based triggers will not support FTP. So we cannot do directly from Azure DataFactory.
As you said, you might need to relay on other process such as logic apps or Azure functions or Azure Automation, etc. to check for file landing on FTP and kick off ADF pipeline execution.

Is there a way to know if a file has been uploaded to a network drive in Azure

I have a network location where every hour a csv file gets dumped. I need to copy that file to an azure blob. How do I know that a file has been uploaded to that network drive. Is there something like a file watcher in azure which monitors this network location? Also, is it possible to copy a file from network location to an azure blob through code?
I'm using .net core APIs deployed to an Azure App Service.
Please suggest a possible solution.
You can use Azure Event Grid but as of today Event Grid does not support Azure File Share.
As your fileshare in on-prem the only way I see is that you can write a custom publisher which can run on-prem and uses Azure Event Grid to send the event to Azure Event Grid and a subscriber which can be Azure Function does the work you want it to do.
https://learn.microsoft.com/en-us/azure/event-grid/custom-event-quickstart-portal
But it will only be an Event and not the file itself which has been added\changed and to do that you will have to then upload the file itself into Azure for processing as well. As the above way requires you to do two things I would recommend run a custom code on-prem which runs CRON job like and looks for the new or edited file and then uploads to Azure BLOB Storage and then execute Azure Function to do your processing task.
Since the files are on-prem you can use powershell to monitor a folder for new files. Then fire an event to upload the file to an Azure blob.
There is a video showing how to do this here: https://www.youtube.com/watch?v=Usih7UywZYA
The changes you need to make are:
replace the action with an upload to azure https://argonsys.com/microsoft-cloud/library/how-to-upload-files-to-azure-blob-storage-using-powershell-and-azcopy/
Run powershell in the context of a user that can upload files

Azure use logic app to load files from file storage to blob storage

I need to use logic app to load some csv files in a files storage in Azure to a blob storage. what trigger to use in logic app to access the files storage in Azure? I have tried e.g. file systems but that seems works for windows file share. What i want to do is to check if there is a new file in the file storage then load it to the blob. I know there are other ways to achieve this but I am assigned the task of looking into the feasibility of doing this using logic app.
For now, since file storage connector now has no trigger like when a file is added or modified so you could not achieve your function. So maybe you could go to feedback and ask for Logic App help .
And now, you could only copy specified file to blob with Get file content using path and Create blob. Or you choose use Azure Function with timer trigger to move new file to blob.
If you still have other questions, please let me know.

Is there any way to know when new file gets in azure file storage

I am trying to download and perform some action whenever there is new file in file storage.
but there is absolutely no way to do it.
I tried mapping the drive on to a vm and use Inotifywait tool (failed to get notifications).
I tried logic app and sftp to file share was not able to connect it.
I checking all over internet but found nothing
can anyone suggest any alternative ?
Thanks
I am trying to download and perform some action whenever there is new file in file storage.
As far as I know, it is not supported Azure storage file trigger now. I also find the related azure feedback.
can anyone suggest any alternative?
Based on my experience, if azure blob storage is possible, you could use blob trigger to replace it. Or you could use WebJob time trigger to check whether there is any update on the storage file share.

Read a text file of webapp from webjobs in azure

I have a webapp and in webapp i have some text files uploaded in temp directory. Next, i also have a webjob to process these files but the problem is i'm not able to access these files from that webapp's temp directory.
Is there any way to achieve this?
Thanks in advance.
The standard way of achieving this would be to put the text files in a blob storage and then read it via webjob. Because in Azure you cannot really guarantee that the temp folder would be shared between the web app and the webjob.
The main site and WebJobs don't share the same %TMP% dir, which is why this doesn't work. One option would be to create those files somewhere under d:\home, e.g. in d:\home\data\tmp`. Then you'll be able to access it from both.
Keep in mind that if you scale out, all the instances will be sharing the same folder, so you may need to name the folder after the instance ID if you don't want that.
I would complement Tiklu's answer. You can solve your problem easily with Azure Functions, which is the evolution of Azure WebJobs SDK. You just upload the text file to a blob and use Azure Functions with BlobStorageTrigger to read the content of the file.
here's a sample:
https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob

Resources