Chad Wallace <[EMAIL PROTECTED]> writes:
> The File::Copy module doesn't support wildcards, does it? I just tried a
> little test script:
>
> #!perl -w
>
> use File::Copy;
>
> © ("C:\\test1\\*.*", "C:\\test2\\");
>
> __END__
>
> and the copy didn't happen. Is it not supposed to accept wildcards? Right
> now I'm just using a copy in a system call instead. I wish I didn't have to
> do that, though. It would be nice if File::Copy would accept wildcards. :-)
Chad,
In addition to the other suggestions, how about this one?
#!/usr/bin/perl -w
use strict;
use File::DosGlob 'glob';
use File::Copy;
foreach my $file (<C:/test1/*.*>) {
next if (-d $file);
copy ($file, "C:/test2") or die "Can't copy \`$file': $!\n";
}
__END__
--David
---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
[EMAIL PROTECTED]
For non-automated Mailing List support, send email to
[EMAIL PROTECTED]