perl ftp and hidden partitions

Discussion in 'Perl Misc' started by schmmichael@gmail.com, Nov 26, 2007.

  1. Guest

    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
    , Nov 26, 2007
    #1
    1. Advertising

  2. On Nov 26, 11:03 am, wrote:
    > 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)?
    Brian McCauley, Nov 26, 2007
    #2
    1. Advertising

  3. Guest

    On 26 Nov., 18:06, Sherman Pendley <> wrote:
    > writes:
    > > 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;

    >
    > 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
    , Nov 29, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    7
    Views:
    346
    Anton Vredegoor
    Apr 30, 2004
  2. RunLevelZero
    Replies:
    4
    Views:
    467
    Mike Meyer
    Jun 5, 2005
  3. cantabile
    Replies:
    6
    Views:
    531
    cantabile
    Jun 14, 2005
  4. Replies:
    3
    Views:
    347
    Thomas J. Gritzan
    May 15, 2007
  5. D. Buck
    Replies:
    2
    Views:
    482
    D. Buck
    Jun 29, 2004
Loading...

Share This Page