Home | History | Annotate | Download | only in Scripts

Lines Matching full:file

29 # Script to do file renaming.
35 use File::Find;
52 my $file = $_;
54 if ($file eq "icu") {
55 $File::Find::prune = 1;
59 if ($file =~ /^\../) {
60 $File::Find::prune = 1;
64 return if $file =~ /^ChangeLog/;
65 return if -d $file;
67 push @paths, $File::Find::name;
79 for my $file (sort @paths) {
80 my $f = $file;
82 $newFile{$file} = $f if $f ne $file;
85 for my $file (sort @paths) {
86 if ($newFile{$file}) {
87 my $newFile = $newFile{$file};
88 print "Renaming $file to $newFile\n";
89 system "svn move $file $newFile";
93 # change all file contents
95 for my $file (sort @paths) {
96 $file = $newFile{$file} if $newFile{$file};
100 open FILE, $file or die;
101 $contents = <FILE>;
102 close FILE;
111 open FILE, ">", $file or die;
112 print FILE $newContents;
113 close FILE;