S
steve
I am trying to list all files in all sub-directories and have the code
below but this is listing the . directories as well as the directories
themselves. I just want the full path filenames and not the individual
directories out. Here is what I have
#!c:/Perl/bin/Perl.exe
@ARGV = qw(.) unless @ARGV;
use File::Find;
find sub { print $File::Find::name, -d && "/", "\n"}, @ARGV
for example if structure is
c:\file.txt
c:\file2.txt
c:\one\teo.txt
c:\two\text.bmp
the output of the script when run from c:\ would be
../
../script.pl
../file.txt
../file2.txt
../one/
../one/teo.txt
../two/
../two/text.bmp
all I want is
../script.pl
../file.txt
../file2.txt
../one/teo.txt
../two/text.bmp
Thanks!
below but this is listing the . directories as well as the directories
themselves. I just want the full path filenames and not the individual
directories out. Here is what I have
#!c:/Perl/bin/Perl.exe
@ARGV = qw(.) unless @ARGV;
use File::Find;
find sub { print $File::Find::name, -d && "/", "\n"}, @ARGV
for example if structure is
c:\file.txt
c:\file2.txt
c:\one\teo.txt
c:\two\text.bmp
the output of the script when run from c:\ would be
../
../script.pl
../file.txt
../file2.txt
../one/
../one/teo.txt
../two/
../two/text.bmp
all I want is
../script.pl
../file.txt
../file2.txt
../one/teo.txt
../two/text.bmp
Thanks!