download a whole folder from a website

Fetch every file under a web folder, without climbing to the folders above it.

  • network
  • files

Steps

  1. wget -r -np -nH -R 'index.html*' https://example.com/files/

    every file under /files/, not the folders above (-np), without index pages

  2. wget -m -np https://example.com/docs/

    mirror it, keeping the dates, to update later

  3. wget -c https://example.com/big.iso

    a single file, resuming if it was cut

  4. wget -i urls.txt

    every address listed in a file

Notes

  • macOS has no wget: brew install wget, or curl -O for one file.

Commands used

  • wget
  • curl

Each has a page in lore: lore wget opens it.