| Store | Cart

Re: SFTP

From: Mike Malony <mhma...@gmail.com>
Mon, 27 Oct 2014 17:52:10 -0500
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 u...@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 <aho...@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...@listserv.ActiveState.com [mailto:> perl...@listserv.ActiveState.com] On Behalf Of Schwartz,> Peter W> Sent: Tuesday, 28 October 2014 2:14 AM> To: perl...@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 | pete...@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...@listserv.ActiveState.com> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs>

_______________________________________________
Perl-Win32-Users mailing list
Perl...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Recent Messages in this Thread
Schwartz, Peter W Oct 27, 2014 03:44 pm
Ashley Hoff Oct 27, 2014 10:05 pm
Mike Malony Oct 27, 2014 10:52 pm
Schwartz, Peter W Oct 27, 2014 10:53 pm
Ashley Hoff Oct 27, 2014 11:02 pm
Justin Allegakoen Oct 28, 2014 01:01 am
sisy...@optusnet.com.au Oct 28, 2014 02:04 am
Will...@L-3Com.com Oct 28, 2014 11:11 am
Messages in this thread

Previous post: RE: SFTP
Next post: RE: SFTP