Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Curl GET on CMD line with spaces in file name

Tags:

curl

cmd

Trying to download a file through CMD line but I have spaces in the filename preventing the download.

curl --request GET -v --user user$site:password https://www.whatever.com/uploads/Filename With Spaces.csv > /users/kanye_west/desktop/FilenameWithSpaces.csv

Tried escaping the spaces with backslash \ already to no avail

like image 361
bennyharassi Avatar asked Nov 02 '25 14:11

bennyharassi


1 Answers

Use %%20 instead of space if it is in the windows batch file. As %20 in batch file means 20th parameter. So for encoding % is used %%.

like image 97
user14128219 Avatar answered Nov 04 '25 20:11

user14128219



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!