#!/usr/bin/perl use File::Copy; foreach my $file (glob '*.txt') { if (-M $file > 3) { move($file, '\\archiv\\' . $file) or warn "$file: $!"; } }