Jump to content

Download software...


sud_crow
 Share

Recommended Posts

Is there any soft that i could use for these and several similar works:

 

i want to download all the source files from

 

ftp://ftp.gnome.org/pub/GNOME/desktop/2.4.../2.4.0/sources/

 

Yes. Gnome 2.4

 

but there are tar.gz AND .bz2 both versions of every pkg.

Then, what i want to do, is to use something to get the links to every (for example) file "*.bz2" and make a list (text file) with a link per line, to use wget to download them...

 

is there any soft able to do this or both things (select and download)

also, it would be good a windows version (friends with broadband not converted... YET!)

Link to comment
Share on other sites

How about this?

 

#!/usr/bin/perl



use Net::FTP::Common;



$common_cfg = { Host => 'ftp.gnome.org', 

     User => 'anonymous',

     Pass => 'me@here.there',

                          LocalDir => './',

     RemoteDir  => '/pub/GNOME/desktop/2.4/2.4.0/sources/'

     };





$ez = Net::FTP::Common->new($common_cfg, Debug => 1);

$ez->login or die "cant login: $@";





@file=$ez->grep(Grep => '[.]bz2');







foreach $file(@file){

print "$filen";

$ez->get(RemoteFile => "$file");

}

 

Of course, if you use it on a windows machine, you'll have to change the path for Perl in the she-bang.

Link to comment
Share on other sites

Hi,

well, actually, my friends with windows wont have perl...

but i can make good use of it anyway...

one question, (a couple actually)

should i define Net::FTP::Common?? or is a command?

also, should i save this under something.sh or what?

 

 

Any other soft? win compatible?? or win only ??

Link to comment
Share on other sites

Oh. Sorry. This is a perl script. You save it as download.pl or whatever. It's designed to be used from the command line.

 

Net::FTP::Common is a perl module. Your friend can download perl for windows for free ( http://www.activestate.com/Products/Langua..._Distributions/ )and hopefully it will have that module already.

Link to comment
Share on other sites

here's a cool way to do it from the command line:

 

 wget -O- ftp://ftp.gnome.org/pub/GNOME/desktop/2.4/2.4.0/sources/ | sed s'/2003.*..gz//'p > fileindex.html

 

You windblows friend is out of luck though.

 

[edited out an extra space typo]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...