ok i have a perl script
use strict;
use warnings;
open(my $in, ">>", "log.txt") or die "cant open log.txt $!" ;
my @files = <*>;
foreach my $file (@files){
print $in $file . "\n";
}
close $in or die "$in $!";
it gets the filenames that are in the same dir as script.
but if there is an other dir in there it needs to look in there and list those files to.
like
bla.txt
blabla.txt
bla/bla3.txt
ect