#!/usr/bin/perl -w # This program will take all spaces out of file names and replace with underscores. # raven@netpimpz.com # 2002-04-07 04:31:02 use strict; use File::Copy; # Grab a file listing from the current directory my @filez = <*>; my $files = 0; foreach my $file (@filez) { chomp($file); my $old_file = $file; $file =~ s/\s+/_/g; $file =~ s/\(|\)//g; if ($old_file ne $file) { move($old_file,$file) or die "Error moving file : $!"; $files++; } } print "Modified $files files.\n";