Recommended Posts

Hi All,

When i try to use Wget to download all files under a directory of FTP, i found that only the list of directory was download. The files under the directory were not downloaded at all.

Here is the log.

=======================================================

D:\Builds>wget -r ftp://127.0.0.1/chdir/

--10:17:38-- ftp://127.0.0.1:21/chdir/

=> `127.0.0.1/chdir/.listing'

Connecting to 127.0.0.1:21... connected!

Logging in as anonymous ... Logged in!

==> TYPE I ... done. ==> CWD chdir ... done.

==> PORT ... done. ==> LIST ... done.

0K ->

10:17:38 (155.27 KB/s) - `127.0.0.1/chdir/.listing' saved [159]

Removed `127.0.0.1/chdir/.listing'.

--10:17:38-- ftp://127.0.0.1:21/chdir/

=> `127.0.0.1/chdir/index.html'

==> CWD not required.

==> PORT ... done. ==> RETR ...

No such file `'.

FINISHED --10:17:38--

Downloaded: 0 bytes in 0 files

======================================================

I have copied 5 files to FTP, and none of them could be downloaded by Wget.

Does some one know how to resolve it?

Thanks

  • 4 years later...

You can do this several ways -- depends what you're trying to do.

 

The easiest way is to use scp instead of wget.

 

You could also use a bash script with all of the filenames in a textfile that you want to download. 

 

for f in `cat textfile`; do wget $f; done

 

EDIT:

Just found this.

wget -rkp -l3 -np -nH --cut-dirs=1

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

  • Recent Achievements

    • Week One Done
      davidbazooked earned a badge
      Week One Done
    • One Month Later
      Jamswaz earned a badge
      One Month Later
    • Week One Done
      Jamswaz earned a badge
      Week One Done
    • Rookie
      Marzoid went up a rank
      Rookie
    • Community Regular
      coch went up a rank
      Community Regular
  • Popular Contributors

    1. 1
      +primortal
      514
    2. 2
      PsYcHoKiLLa
      185
    3. 3
      +Edouard
      159
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!