4

I'd like to batch download .torrent files from a FTP server (e.g. ftp://ftp.fau.de/gimp/gimp/) with one command or one click in a GUI (after entering the hostname and the root directory). The aim is to have all the .torrent file under a root on the FTP server in a directory so that they can be batch added to a torrent client, like Deluge GTK.

In Filezilla I still have to open all directories and click on all of the torrent files.

1 Answers1

7

wget supports recursive download and accept lists which should cover this use case.

wget -r -np -A "*.torrent" ftp://ftp.fau.de/gimp/gimp/

The file-extension should be specified.

The command will recursively download all files ending in torrent from ftp://ftp.fau.de/gimp/gimp/ .

If you want to remove the directory structure and have all files in the current working direcotory add -nd to the argument list.

If you want to skip downloads for files which already exist in the target directory, add -nc to the argument list.

  • Thank you. Any way to avoid downloading a file twice if it's found at more than one location, like on http://cdimage.ubuntu.com/ (not FTP, but the above works as well) (there's no duplicate file created, but the download is unnecessary)? – Kalle Richter Sep 25 '17 at 11:11
  • 1
    @KarlRichter you might find a solution for that here? (unless I've misunderstood the problem) https://stackoverflow.com/questions/4944295/skip-download-if-files-exist-in-wget – LangeHaare Sep 25 '17 at 13:51