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 - This page was cached on 10 Jan 2018 - 07:55.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License