Fantastic,
Thanks John! I've implemented what you've said in my script and it now
accepts dropping a folder on to it for recursive processing of all it's
files. The script looks a bit like this now:
#!/usr/bin/perl
use File::Find;
$report = 'report.txt' ;
open REPORT, ">$report" ;
print REPORT "#### NEW ERROR CHECK STARTS HERE ####\n\n";
for (@ARGV) {
find(\&process_file, $_);
}
`open $report` ;
sub process_file{
##file processing script here
}
Thanks again for your help! I'm sure others will benefit from this thread
in the future also!
Cheers,
-Shannon
On 7/9/02 7:15 AM, in article p05200806b99ebf35a5af@[158.152.20.126], "John
Delacour" <[EMAIL PROTECTED]> wrote:
> At 12:05 pm +1000 6/9/02, Shannon Murdoch wrote:
>> Thanks for the help so far guys, I've got a much better picture of what's
>> going on now!
>>
>> Does the @ARGV array contain the full paths to the file, or just their names
>> (ie, do the files HAVE to be in the same directory as the dropscript?)
>
> The full paths. To verify this, make a droplet using this script and
> drop a few files on it. A file will open listing the pathnames of
> the files.
>
> #!/usr/bin/perl
> $report = 'report.txt' ;
> open REPORT, ">$report" ;
> for (@ARGV) {
> print REPORT "$_\n";
> }
> `open $report` ; # shell command
>
>
> This script will do more, but only drop small things...
>
> #!/usr/bin/perl
> $report = 'report.txt' ;
> open REPORT, ">$report" ;
> for (<>) {print REPORT "$_\n";}
> `open $report` ;
> JD
>