Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
Please let me know the code to handle this in vb.net application(visual studio 2010)

Add a command line argument ABCGET. So the exe can be scheduled as a job to download the files. The download should take place only when the command line argument exists.
Posted
Comments
[no name] 23-Jun-15 16:17pm    
Okay so check the command line for the parameter. What is your actual question?
[no name] 23-Jun-15 16:53pm    
Okay so go write it. No one here is going to do your job for you.

1 solution

Please see my easy to use command line parsing library: Enumeration-based Command Line Utility[^].

I recommend another one published on CodeProject in my article referenced above. If you don't want to use my or any other library, you can simply read how everything works. My article explains it in detail.

How to download files? It depends on protocol. For HTTP, you can use the class System.Net.HttpWebRequest, for FTP — System.Net.FtpWebRequest. There is also a simplified class System.Net.WebClient. Please see:
https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.net.ftpwebrequest%28v=vs.110%29.aspx[^],
https://msdn.microsoft.com/en-us/library/system.net.webclient%28v=vs.110%29.aspx[^].

For a complete example, you can see the full source code of my complete HttpDownloader application, which is, among other things, is capable of completion of downloading of partially downloaded files, if download process was interrupted at any place. Please see: how to download a file from internet[^].

See also my past answers:
how to download a file from the server in Asp.net 2.0[^],
FTP: Download Files[^].

—SA
 
Share this answer
 
v2
Comments
Abhinav S 23-Jun-15 23:14pm    
5.
Sergey Alexandrovich Kryukov 24-Jun-15 0:19am    
Thank you, Anhinav.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900