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

F

Fabio

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
 
D

dw

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');
 
F

Fabio

dw said:
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
 

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

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,187
Latest member
RosaDemko

Latest Threads

Top