4

I found this really useful tool HTTrack online and I'm wondering if I can download a subdirectory, instead of the whole website. For instance, instead of downloading www.example.com and all it's subdirectories, I'd instead download www.example.com/sub/directory and all it's subdirectories.

2 Answers2

7

So user Michael helped me figure this out (for Windows 7) in chat:

  1. Navigate to C:\Program Files\WinHTTrack folder

  2. Shift + right click in the WinHTTrack folder window and select Open command window here

  3. Enter the following:

    httrack www.example.com/subdirectory -D -O "C:\Users\subdirectory" -M1000000000
    
    • Alternatively, you can type this up elsewhere, and then, when ready, copy and paste it to the cmd window by right click > "paste"
  4. Hit Enter and wait....


Note:

  • httrack initiates the process
  • -D makes it so the process "can only go down into subdirs"
    • (i.e., it prevents copying any higher level directories above www.example.com/subdirectory)
  • -O tells machine to save the output to the local directory listed after -O
    • Don't forget to wrap the address in "", especially if your address has spaces
  • -M (optional): limits maximum overall size that can be uploaded/scanned (--max-size[=N]) [in bytes]

You can see more help on the Httrack Users Guide (3.10).

  • Simple instructions for the WinTTrack GUI can be found here
0

example command

httrack -v "http://thissite.com"  -O thissite.com "+*.thissite.com.com/*"

this scan rule download all subdreictory

"+*.thissite.com.com/*"

if download only subdomain

"subdomain.thissite.com.com/*"