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

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
PaperTronics
Posts: 118
Joined: 02 Apr 2017 06:11

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

#1 Post by PaperTronics » 03 Apr 2017 22:05

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

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

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

#2 Post by penpen » 04 Apr 2017 14:32

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

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

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

#3 Post by ShadowThief » 04 Apr 2017 17:32

What the hell is download.exe? That sounds incredibly sketchy. Use cURL or wget like a normal person.

PaperTronics
Posts: 118
Joined: 02 Apr 2017 06:11

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

#4 Post by PaperTronics » 08 Apr 2017 21:17

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.

Post Reply