Read UNC directory 
Author Message
 Read UNC directory

Hi,

Can someone help me with this;

I want to read directories on multiple NT servers that are in a file and
append the contents ,attributes etc in a other file.

Thankz in advance.



Tue, 31 Aug 2004 03:48:25 GMT  
 Read UNC directory
On Thu, 14 Mar 2002 20:48:25 +0100, "{*filter*}Rob"

Quote:

>I want to read directories on multiple NT servers that are in a file
>and append the contents ,attributes etc in a other file.

Here is an example:
#!perl

use warnings;
use strict;

my $inserver = 'server1';
my $inshare  = 'share1';
my $indir    = 'full/path';

my $outserver = 'server2';
my $outshare  = 'share2';
my $outfile   = 'full/path/to/file2';

my $in = "//$inserver/$inshare/$indir";

opendir DIR, $in or die "Cannot opendir $in:$!\n";

closedir DIR;

my $out = "//$outserver/$outshare/$outfile";
open OUT, ">>$out"
   or die "Cannot open $out for appending:$!\n";

close OUT or die "Cannot close $out:$!\n";
__END__

--
Regards, Helgi Briem
helgi AT decode DOT is



Tue, 31 Aug 2004 17:45:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Read UNC directory

2. Reading directories, entering directories, chaning file permissions...

3. CGI Module, Reading a Directory into an Array

4. Reading Directory Structure

5. help selecting and displaying specific files after reading directory:

6. read recursive directories

7. reading directories

8. looking for better way to read from directories

9. read directory question

10. problems with reading a file from a directory

11. finding a file in a directory and reading it

12. Reading a NT directory from Unix

 

 
Powered by phpBB® Forum Software