Link to home
Start Free TrialLog in
Avatar of Robbie_Doherty
Robbie_Doherty

asked on

Curl and Powershell

I am using curl to upload a file to an sftp server on windows.

curl -k - t file - user password sftp server

I can run this from the command line, can i call this from power shell and is there a way to test if the curl command was successful in file upload?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Joe Klimis
Joe Klimis
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Robbie_Doherty

Please confirm that you are trying to upload a file via sftp from windows , and I can construct the command you require , if you are unable to work it out from above

if the command returns anything other than 0 there has been a problem, these codes can be look up from the bottom of the Curl manual
I am unsure which version of Curl you are using this one includes aManual and download

Regards

Joe
SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Robbie_Doherty
Robbie_Doherty

ASKER

Hi

Yes I am trying to upload sftp from windows, I have installed cURL for windows and can run commands from the cmd line, but cannot run it in power shell.

have tried \curl.exe before the command,

thanks
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial