in reply to Files within specified directory
Hi !!
Sorry, If am late on this ! Hope this mite help u .
untested : ( am using Unix machine ) Think You will get all the files within the sub-directories too..use strict; use warnings; use File::Find::Rule; my $path = '/home/vishi83'; my $rule = File::Find::Rule->new; $rule->file; $rule->name('*.txt'); my @filez = $rule->in($path);
Am sure , this is pretty clear, $path holds ur pathname (c:/directory).. Also read perldoc of File::Find::Rule . It has got plenty of options , so we can do such things with ease.
Thank u !!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Files within specified directory
by mosh (Scribe) on Dec 12, 2005 at 08:51 UTC |