What is the best way to retain and download locally a .txt file that is generated during an Azure Devops release? - azure

I am generating a .txt file which includes information about the deployment during my release at a specific stage located at the $(System.BuildDirectory). How can I obtain this .txt file and download it locally, for example onto my desktop?
Thanks

As a workaround, you can try to add a Windows Machine File Copy task to copy the .txt file to your local machine.

Related

Automating Macros for an excel file in SFTP location

I have an excel file in an SFTP location with inbuilt macros in it. I want to do an automation such that the macro runs at a certain time daily in the SFTP server.
Initially I did it using task scheduler, but now that the file is not available locally and since it is residing in the SFTP Location I am unsure on what to do.
Help.
You can't. The SFTP server is a file store, not an application server.
So, download the file in question to a local folder, run your macro using this local file, and - when done - upload it to the SFTP server overwriting the old file.

File archival using spring integration smb

I have a use case where I should read the file from windows remote location with the following steps:
Read file from windows share location say input folder.
Process file and upload to REST service with the content of file.
If the call is successful move the remote file to archive folder, archival folder will also be on windows remote share.
I am using spring integration smb. Please help how can I achieve the archival use case.
Thanks,
barvepan
If it's on the same share, use the SmbRemoteFileTemplate's rename() method.
If it's a different share you'll have to copy the file and remove it (you can use the remote file template for that too).

How to create or use Local Folder in Azure?

I have a required to download a file from SFTP server and the file downloaded is stored to local folder say "D:\Data\tempData.csv"
I have to read the data from local file and consume in my application for other data manipulation.
This job is created using web hooks scheduler in Azure Web Jobs.
I am unable to download file to azure and then read from there.
Can some one help me to use a location for temp data which is equivalent to "D:\Data\tempData.csv" in local system in the azure environment.
Suggest a place in azure where can I download file and then to read from there.
Thanks in Advance.
What I tried?
Tried using SSH.NET dll to download file from SFTP to local folder
Again to read from local folder to my application
Tried looking at BLOB storage usage, which was not approved Tech Arch.
In an Azure Web App, you can create files anywhere under d:\home (for persistent files) or under d:\local (temporary files). See this page for more details on the file system. Try using Kudu Console to see those locations.
How you get the file in that location sounds mostly unrelated to your primary question about what location you can use.
In Azure Environment, the "Web-Jobs" are stored in its local folder where known as "D:\home" and "D:\local" is the local folder used by the Web-hooks.
I was in need to use a folder for temporary usage of downloading a file from SFTP server and again read the file from that local temporary location file and consume it in my application.
I have used the "D:\local\Temp" as the temporary folder which is created by the code after checking the folder existence, then after creating the folder the code will download a file from server and store to this location and then read from the same location and delete the file from that temporary folder.
Thanks all for your help, #David Ebbo Thanks.

When I deploy windows store app, I want a file to be placed at ApplicationData.Current.LocalFolder. How to?

When I deploy windows store app, I want a file to be placed at ApplicationData.Current.LocalFolder so that I can read that file from ApplicationData.Current.LocalFolder.
How to do it?
The problem actually is that I place my file at ApplicationData.Current.LocalFolder, I know where this file is located in my computer. Then I read from this location in my app. But when I upload this to windows store, the app cannot find the file at: ApplicationData.Current.LocalFolder. Please please please help me with this!!!
The app can only deploy files to its install directory, not to its application data. Instead you can copy the file from the install direction on first run the first time the file is needed.

How to deploy application in windows azure with text file?

I have created a mvc4 application with text file. I write some data in a file "ddd.txt". I wrote such address at my PC: "#D://Project//ddd.txt" and it worked finely. However, when I deploy my website on "azurewebsites.net", then I should write another address.
It is very important text file for me. And I would like to read data from it.
What address of directory should I write in my application to work him on Windows Azure server?
I would try using App_Data (you can just add the directory if it doesn't exist in your project).
You could then load the file like this:
string path = HttpContext.Server.MapPath("~/App_Data/ddd.txt");
// load file here
The other option would be to store it in Blob storage, there is a good walkthough of the different features here: http://www.windowsazure.com/en-us/develop/net/how-to-guides/blob-storage/

Resources