Prevent wget to download index.html of 404 page
I use wget to download files, it is working fine but if a wrong path is entered, it goes on 404 page and an index.html is saved.
I do not want that it should create an index.html if wrong path is entered.
Example : here is the mp4 video file link on local server
but if some one enters
it saves index.html file in his/her home directory.
because there is no file client-demo.mp4, the actual file name is client_demo.mp4
A script is doing this. User enters only path of video and it downloads video file for user.
but if user enters wrong path, it saves index.html in user's home directory.
it is embarrassing for us.
Please help so if user enters wrong path, it will not download index.html insted if it gives message like "path not available", it will be very fine.