cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: The FTP problem that turns out to be SFTP

From: Guenter <lists_at_gknw.net>
Date: Sun, 08 Jan 2012 13:30:59 +0100

Hi Michael,
Am 08.01.2012 01:48, schrieb Michael Lam:
> Guenter, not sure if the command line parameters you wanted me to add actually works:
>
> 1) The first one is to a folder which I have no access permission
>
> C:\Users\mlam>curl -S -k -v -u mlam: --key C:\temp2\keys\id_rsa --pubkey C:\temp2\keys\id_rsa.pub -T c:\temp2\test4.txt sftp://sfcadevftp01/sftp_file_drop --insecure @echo Errorlevel: %ERROR
the '-s' should be a lowercase s; its for suppressing the download stats
which we are here not interested in; the '-k' is the shortform for
'--insecure' ...
> * Connection #0 to host sfcadevftp01 left intact
> curl: (79) Upload failed: Operation failed (4/-31)
and here we see already that you get a similar return code (79) as
Daniel and I got too; why you get 79 instead of 78 I dont know atm,
might be related to the trailing @echo ...

> 2) This one is to a directory in which I have access permission, and the file was successfully sent
...
as other Michael pointed out these commands where meant to be written
into a batch file; just open a new text file f.e. with notepad, and
write the curl commandline and the @echo into two separate lines, save
the file with .bat extension, and run it; you can even add a third line
'@pause', then you can just doubleclick the batch file, and the CMD box
keeps open so you can read the results.

Another way without writing a batchfile would be if you just append the
@echo with an ampersand:
curl -s -k -v -u mlam: --key C:\temp2\keys\id_rsa --pubkey
C:\temp2\keys\id_rsa.pub -T c:\temp2\test4.txt
sftp://sfcadevftp01/sftp_file_drop & @echo Errorlevel: %ERROR

see also:
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds_shelloverview.mspx

greets, Günter.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-01-08