Thread File::Find System error 85 has occurred / The local device name is already in use (20 answers)
Opened by provisoft at 2017-05-19 14:52

provisoft
 2017-05-19 14:52
#186558 #186558
User since
2012-04-04
29 Artikel
BenutzerIn
[default_avatar]
Hallo zusammen,

ich will sämtliche Verzeichnise eines Servers mit File::Find auslesen.
Kann man den Fehler:
System error 85 has occurred / The local device name is already in use
abfragen und die Stelle übergehen ohne das das Programm stirbt?

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!perl.exe

use CGI qw(param);
use strict;
use warnings;
use File::Find;

my $dir;
my @files;
my $files;
my @arr;
my $filesize;
my $mb;

use Win32API::File qw(:ALL);

my $qs_srv_adr = "XXXX\\YYYY";
my $pwd        = "xxxx";
my $user       = "yyyy";

my $netuse = 'net use y: \\\\' . $qs_srv_adr . ' ' . $pwd . ' /user:' . $user . '';
system($netuse);

my @dir_entries;
my $start_dir="y:/XXXXX";

find(\&find_parm, $start_dir);

sub find_parm {
   my $akt_file = $File::Find::name; 
         
   push @dir_entries, $akt_file;
 
};


Viele Grüße
Andy

modedit Editiert von GwenDragon: Perl-Code formatiert
Last edited: 2017-05-19 16:28:38 +0200 (CEST)

View full thread File::Find System error 85 has occurred / The local device name is already in use