Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to use wget and http to download all contents from folderAA below to directory /root/sstest

wget -r --directory-prefix="/root/sstest"  -o /root/sstest2.log http://site.com/folder1/folder2/folderAA/

When I submit the above command nothing is downloaded.

If I submit a wget request for a specific file from folderAA the file is actually downloaded to /root/sstest:

wget -r --directory-prefix="/root/sstest"  -o /root/sstest2.log http://site.com/folder1/folder2/folderAA/file.txt

Can someone tell me why I cannot download all file content from folderAA at once using the first wget request?

share|improve this question

migrated from stackoverflow.com Nov 8 '12 at 10:34

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 1 down vote accepted

I think it can only work if the website supports directory listing. But, allowing that is considered a security hole and therefore most of the websites don't allow it and this it why you fail to do what you want

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.