Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > How To Copy The File To The Windows NT? Filesys::SmbClientParser

Reply
Thread Tools

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

 
 
Fabio
Guest
Posts: n/a
 
      12-30-2003
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

 
Reply With Quote
 
 
 
 
dw
Guest
Posts: n/a
 
      12-31-2003

"Fabio" <(E-Mail Removed)> wrote in message
news:bssgfi$l4o$(E-Mail Removed)...

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




 
Reply With Quote
 
 
 
 
Fabio
Guest
Posts: n/a
 
      01-02-2004
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
File::Copy::copy With File Handles MaggotChild Perl Misc 2 10-22-2011 12:15 AM
I want a copy of Windows 7's win32k.sys - can someone send a copy? Mark C NZ Computing 0 05-10-2009 10:15 AM
what is Deep Copy, shallow copy and bitwises copy.? saxenavaibhav17@gmail.com C++ 26 09-01-2006 09:37 PM
is dict.copy() a deep copy or a shallow copy Alex Python 2 09-05-2005 07:01 AM
using File.Copy to copy files to shared hosting site Steve Richter ASP .Net 4 04-18-2005 03:06 PM



Advertisments