Home All Groups Group Topic Archive Search About

Automate file downloads

Author
15 Jan 2007 5:31 PM
steverossiter
Hi,

This is pretty simple stuff but if anyone can point a novice in the
right direction it would be appreciated.

I have a bunch of URL's that point to files on the internet whose
download I would like to automate. Normally, I would have to paste the
address in Internet Explorer's address bar, click 'Save'  when the File
Download dialog box pops up and then indicate a local disk location
when the Save As dialog box appears.

So, the pseudo code would be something like

  Open text file containing URL's
  Retrieve URL from text file
  Open link
  Save file to specific location on local disk
  Retrieve remaining files
  Close text file containing URL's

If I could accomplish this with a simple script that would be nice but
I do have Visual Basic 2005 Express and Visual Basic 6.0 to work with
if needed. No login is needed to access these files.

My system

  Windows XP Pro SP2
  Intel 2.8 GHz with 1.25 GB RAM
  Internet Explorer 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
  .Net Framework ver. 2.0.50727.42

Thanks again, Steve

Author
15 Jan 2007 5:38 PM
Patrice
Try :
http://msdn2.microsoft.com/en-us/library/system.net.webclient.downloadfile.aspx

----
Patrice

<steverossi***@sbcglobal.net> a écrit dans le message de news:
1168882266.533043.153***@51g2000cwl.googlegroups.com...
Show quoteHide quote
>
> Hi,
>
> This is pretty simple stuff but if anyone can point a novice in the
> right direction it would be appreciated.
>
> I have a bunch of URL's that point to files on the internet whose
> download I would like to automate. Normally, I would have to paste the
> address in Internet Explorer's address bar, click 'Save'  when the File
> Download dialog box pops up and then indicate a local disk location
> when the Save As dialog box appears.
>
> So, the pseudo code would be something like
>
>  Open text file containing URL's
>  Retrieve URL from text file
>  Open link
>  Save file to specific location on local disk
>  Retrieve remaining files
>  Close text file containing URL's
>
> If I could accomplish this with a simple script that would be nice but
> I do have Visual Basic 2005 Express and Visual Basic 6.0 to work with
> if needed. No login is needed to access these files.
>
> My system
>
>  Windows XP Pro SP2
>  Intel 2.8 GHz with 1.25 GB RAM
>  Internet Explorer 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
>  .Net Framework ver. 2.0.50727.42
>
> Thanks again, Steve
>
Author
15 Jan 2007 11:40 PM
mayayana
I imagine that the posted .Net method will be the
easiest for what you want, but if you want to use a
component with script you can see here:

http://www.jsware.net/jsware/scripts.php3#ryo

  The component jsTP.exe is designed for VBScript.
It will download files and also report the server
conversation. (In case the download fails you may
want to retrieve the server error code returned.)

  The source code, in the form of a dependency-free
VB6 UserControl (runs on Win95+ with only the VB6
runtime needed), is here:

http://www.jsware.net/jsware/vbcode.php3

Show quoteHide quote
>
> This is pretty simple stuff but if anyone can point a novice in the
> right direction it would be appreciated.
>
> I have a bunch of URL's that point to files on the internet whose
> download I would like to automate. Normally, I would have to paste the
> address in Internet Explorer's address bar, click 'Save'  when the File
> Download dialog box pops up and then indicate a local disk location
> when the Save As dialog box appears.
>
> So, the pseudo code would be something like
>
>   Open text file containing URL's
>   Retrieve URL from text file
>   Open link
>   Save file to specific location on local disk
>   Retrieve remaining files
>   Close text file containing URL's
>
> If I could accomplish this with a simple script that would be nice but
> I do have Visual Basic 2005 Express and Visual Basic 6.0 to work with
> if needed. No login is needed to access these files.
>
> My system
>
>   Windows XP Pro SP2
>   Intel 2.8 GHz with 1.25 GB RAM
>   Internet Explorer 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
>   .Net Framework ver. 2.0.50727.42
>
> Thanks again, Steve
>