perl ftp and hidden partitions

S

schmmichael

Hi all

I have an automation problem with perl and a ftp server.
The server is running on a B&R-SPS. This contains a flash memory (2GB)
for data logging.
The files will be on a hidden partition called "F".

I tried to log in on different ways:
e.g.:


my $ftp=Net::FTP->new($host,Port => 21, Debug => 1, Passive => 1) or
die "Couldn't connect: $@\n";
print "Connected\n";

$ftp->login('br','br',"/F:/") or die $ftp->message;
my $type = $ftp->binary;
my @files = $ftp->ls();
foreach (@files)
{
print "$_\n";
}
$ftp->quit;
print "closed ftp connection\n";

The problem is that I can login, but get only the file list of
partition "C", which isn't a hidden one. So I don't know
how I can login into the hidden partition with perl

Best thanks for any help
 
B

Brian McCauley

Hi all

I have an automation problem with perl and a ftp server.
The server is running on a B&R-SPS. This contains a flash memory (2GB)
for data logging.
The files will be on a hidden partition called "F".

I tried to log in on different ways:
e.g.:

my $ftp=Net::FTP->new($host,Port => 21, Debug => 1, Passive => 1) or
die "Couldn't connect: $@\n";
print "Connected\n";

$ftp->login('br','br',"/F:/") or die $ftp->message;
my $type = $ftp->binary;
my @files = $ftp->ls();
foreach (@files)
{
print "$_\n";}

$ftp->quit;
print "closed ftp connection\n";

The problem is that I can login, but get only the file list of
partition "C", which isn't a hidden one. So I don't know
how I can login into the hidden partition with perl

Just what does "hidden" mean in this context? Does it perhaps mean
"unlistable"? If so what did you expect?

Have you tried just getting the files (by full name)?
 
S

schmmichael

That third argument looks odd - the Net::FTP docs call it "ACCOUNT," which
implies that it will (if provided) cause the client to issue the FTP command
of the same name, which has nothing to do with establishing a working dir
for the session.

You can see the description of the ACCOUNT command here:

<http://www.faqs.org/rfcs/rfc959.html>

Have you tried logging in without the third param, and then using the cwd()
method to change to the drive & directory you want? Something like this:

$ftp->login('br','br') or die $ftp->message;
$ftp->cwd('/F:/') or die $ftp->message;

sherm--

--
WV News, Blogging, and Discussion:http://wv-www.com
Cocoa programming in Perl:http://camelbones.sourceforge.net- Zitierten Text ausblenden -

- Zitierten Text anzeigen -

Thank for all this tips.
I figured out that
$ftp->login('br','br') or die $ftp->message;
$ftp->cwd('/F:/') or die $ftp->message;

works, but not each time. So I think the error is not in my perl code!

I will check the ftp-server and some application code on the sps

thanks again to all the people answerd my question

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ls in ftp fails 5
Perl FTP Get Help 3
what happened with this error? 0
Net::FTP: cwd(' ') 5
Net::FTP and IBM TSO :-( 15
Net::FTP can't locate object method "new" 2
Net::FTP 5
ftp perl script problem.. 8

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top