Skip to content

Commit d960dae

Browse files
committed
Teller for ny og gammel routing
1 parent d7b7b46 commit d960dae

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

mailrouter/move_emails.pl

+9-7
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@
2828
'testType' => ["testService", "testAction"]
2929
);
3030

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;
3434

3535
opendir(DIR, $inputDirectory) or die "Can't open $inputDirectory: $!";
3636

37-
my $moveCounter = 0;
37+
my $newCounter = 0;
38+
my $oldCounter = 0;
3839
my $fileCounter = 0;
3940

4041
foreach my $filename (readdir(DIR)) {
@@ -74,18 +75,19 @@
7475
move("$inputDirectory/$filename", "$newEmottakDirectory/$filename");
7576
}
7677
printf "%s sent to new system!\n", $filename;
77-
$moveCounter++;
78+
$newCounter++;
7879
}
7980
else {
8081
if ($dryRunMode eq 0) {
8182
move("$inputDirectory/$filename", "$oldEmottakDirectory/$filename");
8283
}
8384
printf "%s sent to old system!\n", $filename;
84-
$moveCounter++;
85+
$oldCounter++;
8586
}
8687
}
8788
}
8889

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;
9092

9193
closedir(DIR);

0 commit comments

Comments
 (0)