I had much the same experience.

I've used both PSFTP.exe from Putty and sftp.exe from Cygwin.

In both cases I write a batch file and execute the exe via a system call.

 $RUNSTRING = "$main::sftpbin -b $SFTP_BATCH_FILE $SFTPLOGIN >> $TEMPLOG";

## which translates to
##'c:\cygwin\bin\sftp -b c:\work\client_batch.txt user@site >>
\work\client_user.yyymmdd.log

 $my_rc = system("$runstring");

For error trapping you need to capture the output and scan it for key
words.
Though, I think sftp from cygwin give a pretty trustworthy success/fail
return code. psftp doesn't.

Good luck,
Mike

On Mon, Oct 27, 2014 at 5:05 PM, Ashley Hoff <ah...@da.com.au> wrote:

> Not sure if you are going to get much more of a response Peter - this mail
> list seems pretty dead.
>
> As far as I know, it's not an easy task to actually get SFTP client
> functionality in Perl.  I've had plenty of issues over the years, that I
> gave up trying to find a Perl module that will do what I want.
>
> In the end, I used PSFTP.exe via a system command call.  PSFTP is included
> with Putty.  It can be a bit of a hack, but you can get it to work.  Some
> of the Gotcha's include answering all the interactive prompts (or more to
> the point, ignore some of them) and capture output, but it's all doable.
>
> Cheers
> Ashley
>
> From: perl-win32-users-boun...@listserv.activestate.com [mailto:
> perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Schwartz,
> Peter W
> Sent: Tuesday, 28 October 2014 2:14 AM
> To: perl-win32-users@listserv.ActiveState.com
> Subject: SFTP
>
> I'm trying to locate an SFTP install for Windows (32-bit) but I can't seem
> to find anything in the PPM for some reason.  Does anyone have any
> recommendations on how to get this for Windows?
>
> ________________________________________
> Peter W Schwartz | Vice President | IB Tech Market | Investment Bank |
> J.P. Morgan | Floor 4, 115 S Jefferson Road, Bldg D, Whippany, NJ | T:
> +1(973) 793-7407 | peter.w.schwa...@jpmorgan.com | jpmorgan.com
>
> This email is confidential and subject to important disclaimers and
> conditions including on offers for the purchase or sale of securities,
> accuracy and completeness of information, viruses, confidentiality, legal
> privilege, and legal entity disclaimers, available at
> http://www.jpmorgan.com/pages/disclosures/email.
> _______________________________________________
> Perl-Win32-Users mailing list
> Perl-Win32-Users@listserv.ActiveState.com
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to