CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Open a shared folder

 



ammar.pdf
New User

Sep 8, 2010, 2:05 AM

Post #1 of 2 (569 views)
Open a shared folder Can't Post

Hi All,

I need to create a perl script to open network shared folder (//server/folder) then I need to count its files.

I used :
--------------------------
opendir(ETC,"//lion/tmp") || die "Error ?: $!";
while ($name = readdir(ETC)) {
print "$name\n";
}
closedir(ETC);
--------------------------

and it worked fine.

But the problem is when the server require a username and password to grant the access.

- How can I pass the username and the password to the server to open the folder ?
- Is there any other way to do that (instead of the previous method)?

Note: the perl script will be run under windows platform and the server maybe Windows or Linux(samba).

Thanks.

- Ammar


1arryb
User

Sep 8, 2010, 6:10 AM

Post #2 of 2 (563 views)
Re: [ammar.pdf] Open a shared folder [In reply to] Can't Post

Hi ammar,

You might take a look at one of the Authen::SMB modules on CPAN.

Larry

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives