I’m trying to use cURL to transfer files to an ftp server, but for the life of me I can’t figure out how to deal with whitespaces in my directory names. For example, I try the following code:
C:\cURL\curl -T C:\Documents and Settings\outputfolder\temp1.txt ftp://ftpsite.com/ --user username:password
but it responds with “curl: Can’t open ‘C:\Documents’!” I figured it has any issue with the whitespace, so I tried replacing it with %20:
C:\cURL\curl -T C:\Documents%20and%20Settings\outputfolder\temp1.txt ftp://ftpsite.com/ --user username:password
but it then responds with ‘curl: Can’t open ‘C:\Documents%20and%20Settings\outputfolder\temp1.txt’!’
So, how do I go about dealing with the whitespace characters when I’m trying to specify the folder and file that I want to transfer?
Try wrapping your filenames in double quotes.
I.e.: