Home > Archive > PERL Beginners > June 2007 > Re: Net::SFTP functions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: Net::SFTP functions
|
|
| Julien Laffitte 2007-06-29, 9:58 pm |
| On 27 juin, 16:38, orya...@yahoo.com (Oryann9) wrote:
> --- Octavian Rasnita <orasn...@gmail.com> wrote:
>
>
>
>
>
> Also you can use
>
> $remotedir =3D qq(/path/to/remoteserver/dir/);
> $sftp->cwd($remotedir) || die "CWD to folder outbound
> failed!: $!",
>
> ## OHMONSTER here is the remote file
> foreach ( $sftp->ls() ) {
> if (/${$fref}\d+\w+/) {
> $OHMONSTER =3D $_;
> $sftp->get( $OHMONSTER, "$localdir/$OHMONSTER" )
> || die "SFTP get from xxxx.com failed!: $!",
>
> ________________________________________
_________________________________=
__=AD_________
> Food fight? Enjoy some healthy debate
> in the Yahoo! Answers Food & Drink Q&A.http://answers.yahoo.com/dir/?link=
=3Dlist&sid=3D396545367
>
> ________________________________________
_________________________________=
__=AD_________
> Building a website is a piece of cake. Yahoo! Small Business gives you al=
l the tools to get online.http://smallbusiness.yahoo.com/webhosting
Octavian Rasnita > Ok I really don't get it.
My folder tree is similar to that one: d:\shared\exports\Export.csv
When I connect to the sFTP server, the home directory is the "shared"
folder, so when I list the folders I see the "exports" one.
I tried:
$sftp->get("exports/Export.csv", local/folder/file.csv);
$sftp->get("/exports/Export.csv", local/folder/file.csv);
$sftp->get("shared/exports/Export.csv", local/folder/file.csv);
$sftp->get("/shared/exports/Export.csv", local/folder/file.csv);
But neither of these work :(
oryann9 > the cwd command does not exists with sFTP package :((
It'd have been to easy !
| |
| Octavian Rasnita 2007-06-30, 10:03 pm |
| From: <julien.laffitte@gmail.com>
> Octavian Rasnita > Ok I really don't get it.
> My folder tree is similar to that one: d:\shared\exports\Export.csv
Ok, now I think I understand why it doesn't work. You are using Windows.
I couldn't make Net::SFTP to work under Windows.
I heard that there are some ways of making this module work under Windows,
but I couldn't make it to work.
If there is someone who knows how to do that, please tell us.
Octavian
|
|
|
|
|