Page 1 of 1

How to download any file using CMD??? PLease Help !!!

Posted: 03 Apr 2017 22:05
by PaperTronics
How to download a file on the internet using Batch? I know about download.exe but I don't know why whenever I type the command "download.exe www.website.com D:/" it says "The filename D:/ contains illegal characters". Any help would be appreciated.
Thanks for your attention
PaperTronics

Re: How to download any file using CMD??? PLease Help !!!

Posted: 04 Apr 2017 14:32
by penpen
Well i won't download such a tool only to test, but it probably could be programmed or compiled wrong, so it only supports download to the actual path, so this might work:

Code: Select all

pushd "Z:\"
:: assumed that download.exe could be found from "Z:\" (its location is "Z:\", or listed in the PATH variable)
download.exe "www.website.com" "test.txt"
popd


penpen

Re: How to download any file using CMD??? PLease Help !!!

Posted: 04 Apr 2017 17:32
by ShadowThief
What the hell is download.exe? That sounds incredibly sketchy. Use cURL or wget like a normal person.

Re: How to download any file using CMD??? PLease Help !!!

Posted: 08 Apr 2017 21:17
by PaperTronics
Thanks, penpen and ShadowThief for replying. Although I figured it out myself but still wouldn't be able to do it without you guys. Thanks.