File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 28
28
' testType' => [" testService" , " testAction" ]
29
29
);
30
30
31
- printf " Input directory: %s \n " , $inputDirectory ;
32
- printf " New eMottak directory: %s \n " , $newEmottakDirectory ;
33
- printf " Old eMottak directory: %s \n " , $oldEmottakDirectory ;
31
+ printf " Input directory : %s \n " , $inputDirectory ;
32
+ printf " New eMottak directory : %s \n " , $newEmottakDirectory ;
33
+ printf " Old eMottak directory : %s \n " , $oldEmottakDirectory ;
34
34
35
35
opendir (DIR, $inputDirectory ) or die " Can't open $inputDirectory : $! " ;
36
36
37
- my $moveCounter = 0;
37
+ my $newCounter = 0;
38
+ my $oldCounter = 0;
38
39
my $fileCounter = 0;
39
40
40
41
foreach my $filename (readdir (DIR)) {
74
75
move(" $inputDirectory /$filename " , " $newEmottakDirectory /$filename " );
75
76
}
76
77
printf " %s sent to new system!\n " , $filename ;
77
- $moveCounter ++;
78
+ $newCounter ++;
78
79
}
79
80
else {
80
81
if ($dryRunMode eq 0) {
81
82
move(" $inputDirectory /$filename " , " $oldEmottakDirectory /$filename " );
82
83
}
83
84
printf " %s sent to old system!\n " , $filename ;
84
- $moveCounter ++;
85
+ $oldCounter ++;
85
86
}
86
87
}
87
88
}
88
89
89
- printf " %s of %s files moved\n " , $moveCounter , $fileCounter ;
90
+ printf " %s of %s files moved to new system\n " , $newCounter , $fileCounter ;
91
+ printf " %s of %s files moved to old system\n " , $oldCounter , $fileCounter ;
90
92
91
93
closedir (DIR);
You can’t perform that action at this time.
0 commit comments