opendir( DIR, '.' );
    my @files = readdir(DIR);
closedir( DIR );
foreach my $file ( @files ) {
    next if $file =~ /\./;
    rename( $file, "$file.pl" );
    print "$file => $file.pl\n";
}
print "Complete";
my $read = <STDIN>;

Save this script to your foswiki/bin folder and execute it with Perl.

-- CosmicNet - 16 May 2011
Topic revision: r1 - 16 May 2011, CosmicNet
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy