#!/usr/bin/perl my $dir = '.'; my $pattern = '.jpg$'; #Filenames ending in .jpg opendir DIR, $dir or die "Cannot readdir $dir:$!\n"; my @files = grep /$pattern/,(readdir DIR); closedir DIR; print "@files\n"; foreach my $file (@files){ system ("somecommand $file"); }
In reply to Re: Running Batch of Files
by zentara
in thread Running Batch of Files
by tej
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |