in reply to Re: help moving files
in thread help moving files
It finds all the .pl files in c:\Pete and sub-directories and copies them into c:\folderb.#!/usr/bin/perl use warnings; use File::Copy; use File::Find; find(\&wanted, 'c:\\Pete'); sub wanted { if ($File::Find::name =~ /\.pl$/) { my $copyname = "c:\\folderb/$_"; print "Copying $_ from $File::Find::dir to $copyname\n"; copy("$File::Find::name","$copyname"); } }
|
|---|