#!/bin/perl #usage: #C:\Perl>perl Print_dir_sizes.pl "C:/Perl/" use warnings; use strict; use File::Copy; my $path = $ARGV[0]; die "You must supply a full directory path" unless (-e $path && -d $pa +th); my @dirs; opendir(DIR, $path) || die "can't opendir $path: $!"; my @fileet = grep { -f "$path/$_" } readdir(DIR); closedir(DIR); foreach my $file (@fileet) { my $newfile = $file; $newfile =~ s/ä/ä/g; $newfile =~ s/ö/ö/g; move("$file", "$path/$newfile"); }
In reply to Re^4: Renaming files in dir
by larus
in thread Renaming files in dir
by larus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |