use File::Copy; my @files = <"$ENV{ DOCUMENT_ROOT }/config/*.*">; foreach( @files ) { my $success = move( "$ENV{ DOCUMENT_ROOT }/config/$_", "$ENV{ DOCUMENT_ROOT }/config/$_.HID" ); if( !$success ) { print "Fehler beim Umbennen von Datei $_\n"; } }