using (var client = new WebClient())
{
client.DownloadFile("http://example.com/file/song/a.mpeg", "a.mpeg");
}
More Related Contents:
- A potentially dangerous Request.Path value was detected from the client (*)
- Code for decoding/encoding a modified base64 URL (in ASP.NET Framework)
- Wait Until File Is Completely Written
- C# – How to get Program Files (x86) on Windows 64 bit
- File I/O with streams – best memory buffer size
- determine if file is an image
- In C# check that filename is *possibly* valid (not that it exists) [duplicate]
- Get host domain from URL?
- Mirroring console output to a file
- how to read all files inside particular folder
- Why does Path.Combine not properly concatenate filenames that start with Path.DirectorySeparatorChar?
- How can I read/stream a file without loading the entire file into memory?
- How to check if a file exists in a folder?
- Detect if PDF file is correct (header PDF) [closed]
- How to remove a single Attribute (e.g. ReadOnly) from a File?
- Adding elements to an xml file in C#
- What would be the fastest way to concatenate three files in C#?
- Getting absolute URLs using ASP.NET Core
- How can I get URLs of open pages from Chrome and Firefox?
- Check if an executable exists in the Windows path
- open file in exclusive mode in C#
- Using Directory.GetFiles with a regex in C#?
- C# regex pattern to extract urls from given string – not full html urls but bare links as well
- How to change the port number for Asp.Net core app?
- .NET 4.5 file read performance sync vs async
- C#: How to open Windows Explorer windows with a number of files selected
- Encrypt SQLite database in C#
- C# Searching for files and folders except in certain folders
- c# open file, path starting with %userprofile%
- Why does System.IO.File.Exists(string path) return false?