#!/usr/bin/perl use strict; use warnings; use Encode; use File::Copy; for (glob '*'){ my $utf8_fn = decode('latin1', $_); $utf8_fn = encode("utf-8", $utf8_fn) , "\n"; if ($utf8_fn ne $_){ print "Moving from $_ to $utf8_fn\n"; move($_, $utf8_fn); } }