This prints the output to the text file with comma delimiters. Is it possible to print to the text file using ROWS, so that each MP3 file listing is on a separate line on the output? Better readability. Importing to excel is an option, but I would like to view in the text file.....
use strict; use File::Find; open (MP3, ">c:/perltest/mp3test.txt"); my @directories = (".", "c:/"); my @foundfiles; # Here, we collect all .mp3 files below each directory in @directories # and put them into @foundfiles find( sub { push @foundfiles, $File::Find::name if /\.mp3$/ }, @direct +ories ); # and output them all print join("\n", @foundfiles), "\n"; $, = ','; $/ = "\n"; print MP3 ("\n", @foundfiles), "\n"; close (MP3);
In reply to Re: Re: How do I write NT perl script to search mult. dirs and output to a file?
by rallen11
in thread How do I write NT perl script to search mult. dirs and output to a file?
by rallen11
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |