curl-users
FTP Upload and destination path : problem and suggestion
Date: Wed, 13 Aug 2003 18:57:05 +0200
Hi,
I use cURL in many ways, but in one case I have a problem.
I use cURL to upload files to an ftp server, and the problem is that I am not sure that the complete target upload path exists in the FTP server.
So, if it does not exists, it fails.
If if try to create directories via the -Q command, it only works if none of the directories exist.
Exemple (I am on win32) :
curl -u anonymous:nopwd -T C:\test.dat ftp://targetftp/test/1/2/3/
=> fails if /test/1/2/3 doesn't exist
curl -u anonymous:nopwd -Q "mkd /test" -Q "mkd /test/1" -Q "mkd /test/1/2" -Q "mkd /test/1/2/3" -T C:\test.dat ftp://targetftp/test/1/2/3/
=> fails if, for exemple /test exists (error for the mkd /test)
I don't know, at the moment when I run the command line, which target path exists or not.
So :
- does anybody have a solution ? (I think that is not possible)
- would it be possible to create a sort of "--create-target-dir" option which would try to mkdir non-existant dirs in the target path ?
Thanks a lot, and thanks for this great tools.
ZeuG
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-14