Perl

      @ls = `ls *.txt`;
      chomp @ls;
      foreach$file(@ls){
              $file_utf8 = $file;
              $file_utf8 =~ s/\.(.*)?$//;
              $file_utf8.= ".utf8";
              system("nkf -w $file > tmp");
              system("mv tmp $file_utf8");
              print "nkf -w $file > tmp\n";
      }