How To Copy The File To The Windows NT? Filesys::SmbClientParser

Discussion in 'Perl' started by Fabio, Dec 30, 2003.

  1. Fabio

    Fabio Guest

    Hello,

    I'm trying to put the file into the Windows NT server using the Perl
    script but it doesn't work. Just look at the following script:

    use Filesys::SmbClientParser;

    my $fl = '/temp/file.txt';

    my $smb = new Filesys::SmbClientParser
    (undef, (user => 'user', password => 'pass'));

    $smb -> Host ('191.254.1.1');
    $smb -> Share ('tdsa_b$');
    $smb -> cd ('IN');
    $smb -> put ($fl);

    The only message I get looks like this:

    sh: -c: line 1: unexpected EOF while looking for matching `''
    sh: -c: line 2: syntax error: unexpected end of file

    What could be wrong here? Is there any other way to put this file into
    the Windows NT server? I cannot mount the file share under using the
    'system' or 'exec' function because it doesn't work.

    When I use

    smbmount //191.254.1.1/tdsa_b$ /mnt/test -o user=user,password=pass

    under the Linux command prompt it works fine. But if I put that command
    into `` or Perl 'system' function it shows me the following message:

    Could not resolve mount point

    Any ideas? Thanks for any advice.

    ...:: fabio
     
    Fabio, Dec 30, 2003
    #1
    1. Advertising

  2. Fabio

    dw Guest

    "Fabio" <> wrote in message
    news:bssgfi$l4o$...

    > smbmount //191.254.1.1/tdsa_b$ /mnt/test -o user=user,password=pass
    >
    > under the Linux command prompt it works fine. But if I put that command
    > into `` or Perl 'system' function it shows me the following message:
    >
    > Could not resolve mount point
    >
    > Any ideas? Thanks for any advice.


    are you losing the $.... would this work:
    system ("smbmount", '//191.254.1.1/tdsa_b$', '/mnt/test', '-o',
    'user=user,password=pass');
     
    dw, Dec 31, 2003
    #2
    1. Advertising

  3. Fabio

    Fabio Guest

    dw wrote:

    >>smbmount //191.254.1.1/tdsa_b$ /mnt/test -o user=user,password=pass
    >>
    >>under the Linux command prompt it works fine. But if I put that command
    >>into `` or Perl 'system' function it shows me the following message:
    >>
    >>Could not resolve mount point
    >>

    >
    > are you losing the $.... would this work:
    > system ("smbmount", '//191.254.1.1/tdsa_b$', '/mnt/test', '-o',
    > 'user=user,password=pass');


    Yes, that's it! I've fixed the dollar sign problem and it works properly
    now. Thanks for advice!

    ...:: fabio
     
    Fabio, Jan 2, 2004
    #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. Alex
    Replies:
    2
    Views:
    1,240
  2. Replies:
    26
    Views:
    2,124
    Roland Pibinger
    Sep 1, 2006
  3. eddie wang
    Replies:
    0
    Views:
    416
    eddie wang
    Oct 3, 2003
  4. eddie wang

    filesys.createTextFile limit

    eddie wang, Dec 11, 2003, in forum: ASP General
    Replies:
    3
    Views:
    173
    Aaron Bertrand - MVP
    Dec 11, 2003
  5. MaggotChild

    File::Copy::copy With File Handles

    MaggotChild, Oct 18, 2011, in forum: Perl Misc
    Replies:
    2
    Views:
    509
    Ilya Zakharevich
    Oct 22, 2011
Loading...

Share This Page