Solved

How to auto download files

Posted on 2008-10-29
5
676 Views
Last Modified: 2012-05-05
Hi

I want to write a program that auto downloads files, if necessary, to a certain folder. I do not want the save dialog box appearing  to ask user where to save the file to, instead I wish the file would be automatically download to like c:\MyDownload folder. How to do this or at least what technology involves in?

Thanks

Peter
0
Comment
Question by:petershaw9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 12

Expert Comment

by:jandromeda
ID: 22837514
0
 
LVL 12

Accepted Solution

by:
jandromeda earned 300 total points
ID: 22837571
Here is a sample code.
try
			{
				WebClient client = new WebClient();
				client.DownloadFile(@"http://www.tnpsc.com/downloads/NaturesScenery.jpg",
				                    @"C:\photo.jpg");
			}
			catch (Exception e)
			{
				Console.WriteLine(e.Message);
			}

Open in new window

0
 

Author Comment

by:petershaw9
ID: 23188646
very good. thank u.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question