in reply to Re: Re: Re: read copy and moving files
in thread read copy and moving files
#!/usr/bin/perl -w use strict; my $dir = "C:\\TEMP\\"; my $outdir = "C:\\temp2\\"; opendir (DIR, $dir) || die "can't open $dir: $!"; my @files = readdir(DIR); close(DIR); foreach (@files) { # change the extension to one of your liking if ($_ =~ /.log/) { system ("copy $dir\\$_ > $outdir\\$_"); } }
|
|---|