473,382 Members | 1,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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

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

Jul 19 '05 #1
2 5914
dw

"Fabio" <fa***@anti-spam.inet.alpha.pl> wrote in message
news:bs**********@nemesis.news.tpi.pl...
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');


Jul 19 '05 #2
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

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Grey | last post by:
I have a ASP.NET web application which is required to copy file from windows server to Novell Netware server. I have used impersonation to connect to Netware server. The application works fine when...
9
by: MAF | last post by:
Does anyone know why in 2005 I might be getting this error everytime I try and recompile? Error 226 Unable to copy file "obj\Debug\myfile.dll" to "bin\Debug\myfile.dll". The process cannot...
3
by: MAF | last post by:
Does anyone know why in 2005 I might be getting this error everytime I try and recompile? Error 226 Unable to copy file "obj\Debug\myfile.dll" to "bin\Debug\myfile.dll". The process cannot...
5
by: Standist | last post by:
I want install software on PC in my local network. First I want copy file to the PC through default share like c$ or d$ on the PC. Then install the software through wmi. I have the administrator...
3
by: Boki | last post by:
Dear All, I just installed the DirectX SDK, and I install the Tutorial00 project, I compile it, but it shows: ------ Build started: Project: Tutorial00, Configuration: Debug Win32 ------...
0
by: Pivalig | last post by:
Hello, i try to copy file from Pocket PC to network printer using this code : destination = "\\\\pc1\\ep1000\\Bill.txt"; File.Copy("\\Program Files\\MobileKhelner\\Bill.txt", destination); ...
9
rizwan6feb
by: rizwan6feb | last post by:
Hello everybody. I need help on how to use copy function to copy file from one computer to another ( or any other way i can copy the file). The computers are on a local network.
1
by: Irrigho5 | last post by:
i have the open file function just need help with the copy file function and main Ask for a source filename and a target filename. Then copy the source file to the target file using the...
2
by: foss | last post by:
hi all, I am not able to copy file from a directory in the server to another directory. Here, the source is outside the web root directory and the destination is inside the web root directory. ...
1
by: rajibdotnet | last post by:
Till Date, I find no solution to the problem below. Unable to copy file "obj\Debug\Tax2010.dll" to "bin\Tax2010.dll". The process cannot access the file 'bin\Tax2010.dll' because it is being used...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.