I would this something like this would work...
@remotefiles = $sftp->ls();
foreach $GtnFileName(@remotefiles)
{
if ($file =~ /$match_this/)
{
$sftp->get($GtnFileName,$LocalFile);
}
}
> -----Original Message-----
> From: Briggs, Larry [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 06, 2002 11:10
> To: [EMAIL PROTECTED];
> '[EMAIL PROTECTED]'
> Subject: Net::sftp
>
>
> Hi
> I am converting my perl programs from net::ftp to use
> net::sftp. My problem
> is this I was able to get files with net::ftp where I only
> knew part of the
> name with a wildcard *. I have tried this with net::sftp and
> it is treating
> the * as part of the file name and sends back the error could
> not find file
> filename* . The problem is that the box that our users sftp
> to puts a time
> date stamp onto the end of the filename that is why I need to use a
> wildcard. So how do I get files using net::sftp when I do not
> know the full
> name.
>
>
> %args = ("user"=>"username",
> "password"=>"somepassword"
> );
> $host = "hostmachine";
> $GtnFileName = "filename\*";
> $LocalFile = "c:\\FTP\\holddir\\";
>
>
> $sftp = Net::SFTP->new($host,%args);
> $sftp->get($GtnFileName,$LocalFile);
> quit;
>
>
> _______________________________________________
> Perl-Win32-Users mailing list
> [EMAIL PROTECTED]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>