Dear Christopher,
the share is already available. It is only the subdirectory which I need.
Tim
Gerber,
Christopher J
Christopher.J.Ge An
[EMAIL PROTECTED] 'Tim Straub'
[EMAIL PROTECTED],
19.03.2003 17:39 [EMAIL PROTECTED]
ate.com
Kopie
Thema
RE: (no subject)
Tim,
AFAIK, the mkdir command can only make subdirectories, not new shared
folders. Making shares is covered very well in Roth's Win32 Perl
Programming, pages 70-78. To create a share, take a look at
Win32::NetResource::NetShareAdd or Win32::Lanman::NetShareAdd. Here's a
sample:
use Win32::NetResource;
my %Share = (
'path'= 'C:\\TEMP',
'maxusers'= 1,
'netname' = 'Temp$',
'remark' = 'Hidden Share of TEMP',
'passwd' = '',
'permissions' = 0
);
my $Param;
my $Machine='Server';
if( Win32::NetResource::NetShareAdd( \%Share, $Param, $Machine ) {
print Success\n;
}
The above code is untested.
Chris
-Original Message-
From: Tim Straub [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 7:10 AM
To: [EMAIL PROTECTED]
Subject: (no subject)
Hi list,
is there any way to open a hidden UNC path with the mkdir statement
given by a parameter.
Let's say I run the script with the parameter
\\server\new$
the path will get truncated one time by the newline '\n' and
the dollar
sign will by cut off.
Then putting it in the variable $x the statement
mkdir( $x, 0777 );
will fail!
I would like to use the script as a subroutine which will get
the path -
this have to be done as \\server\\share\new_directory. So it is not
possible to use an other syntax!
Any suggestions???
Thanks in advance
Tim
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be
privileged. It is intended for the addressee(s) only. Access to this
E-mail by anyone else is unauthorized. If you are not an addressee, any
disclosure or copying of the contents of this E-mail or any action taken
(or not taken) in reliance on it is unauthorized and may be unlawful. If
you are not an addressee, please inform the sender immediately.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs