How to download all files with WGET, including .java files.
When I was trying to mirror a website with Java files, XML files, ActionScript files, etc, wget only seems to download the commonly known files such as xml, txt, etc.
It seems to not be downloading the .java, .as files.
Here is my command:
wget --no-parent --user=USERNAME--password=PASSWD-e robots=off --header "CUSTOM HEADERS" "http://URL" -r --timeout=25
There doesn't seem to be anything wrong with it to me. Once the download is finished, none of the .java or .as files are there.
Also is there a way to skip over every directory that has a string in it? For example, if a directory is called "backup3r98238943r3jrefi", can I skip it for having the word "backup" in it? I want to skip any directory located in any dir/subdir on the site with a keyword in it.
You can use --reject
or --exclude-directories
to skip things:
wget ... --reject '*backup*' ...
wget ... --exclude-directories '*backup*' ...