How to download and save a website static file

I have a requirement to download a website static file like the below examples and directly save in my local computer machine in some input path given (ex:c:\\My Documents)
http://yahoo.com/myuri/mypath/myfile.img
http://yahoo.com/myuri/mypath/myfile.xls
http://yahoo.com/myuri/mypath/myfile.pdf
http://yahoo.com/myuri/mypath/myfile.txt

this whole operation should not open any dialog box, any prompt to save. The whole operation of opening the given online file path and saving them should happen through code. Can i achieve this in javascript or Jquery ? If so please give me the direct sample code with code library inclusions.

Sorry, but that is not possible to achieve due to it being such an extreme security risk.

May not be what you want, but if the file is zipped and you link to it, it will just download—at least on my system.

Yes but the files i am giving as example are assumed to be unprotected. i gave yahoo.com as an example only. Its like my own web application has some static files which i want to download inside a separate html/javacscript.